Jump to content

Applications Can't Access Second HDD - Ubuntu

GrandNebSmada

Applications that are installed on my main SSD (/dev/sda1) such as discord cannot access data on my secondary hard drive (/mnt/sdb1). For example if I try to upload an image that is stored on it, Discord tells me it failed to upload. This is also a problem for pretty much any software that isn't native to the OS.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, EDK Tech said:

It doesn't unfortunately. My hard drive is mounted perfectly fine and I can access all the files on it through my file explorer. The problem is with other applications being able to access the files. They can see the drive, but there is a permission issue.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, 5Beans6 said:

Applications that are installed on my main SSD (/dev/sda1) such as discord cannot access data on my secondary hard drive (/mnt/sdb1).

Linux doesn't have a concept of drives (C:, D:) like Windows does. Instead you have a directory tree that starts at / and all directories beneath it contain your files. If you add an additional drive, that drive needs to be mounted somewhere in that directory tree. So e.g.the  /home/5Beans6 and /home/Eigenvektor directories could actually be on different drives. Most applications can's access the raw drive below /dev, since that require root permissions and is not a real directory.

 

In addition to the answer @EDK Tech gave you, here's a link explaining how to permanently mount the additional drive by configuring it in /etc/fstab:

https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+and+set+auto-mount+at+boot

 

5 minutes ago, 5Beans6 said:

It doesn't unfortunately. My hard drive is mounted perfectly fine and I can access all the files on it through my file explorer. The problem is with other applications being able to access the files. They can see the drive, but there is a permission issue.

Ok, then you can probably ignore what I said above 😅 You probably need to set the permissions on the directory so that it is readable by your user without e.g. sudo. What do the current permissions look like?

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

11 hours ago, Eigenvektor said:

Linux doesn't have a concept of drives (C:, D:) like Windows does. Instead you have a directory tree that starts at / and all directories beneath it contain your files. If you add an additional drive, that drive needs to be mounted somewhere in that directory tree. So e.g.the  /home/5Beans6 and /home/Eigenvektor directories could actually be on different drives. Most applications can's access the raw drive below /dev, since that require root permissions and is not a real directory.

 

In addition to the answer @EDK Tech gave you, here's a link explaining how to permanently mount the additional drive by configuring it in /etc/fstab:

https://confluence.jaytaala.com/display/TKB/Mount+drive+in+linux+and+set+auto-mount+at+boot

 

Ok, then you can probably ignore what I said above 😅 You probably need to set the permissions on the directory so that it is readable by your user without e.g. sudo. What do the current permissions look like?

I tried changing the permissions and that didn't work. I also tried changing the owner of the entire drive to my user from root (using the recursive option) and it still says the owner is root and the programs still cant access it (I did use sudo)

 

Edit: Image of console output for ownership/permisions
f752a35350f20a2d66453f1b648e1f2e.png

Link to comment
Share on other sites

Link to post
Share on other sites

On 11/14/2021 at 8:29 PM, 5Beans6 said:

I tried changing the permissions and that didn't work. I also tried changing the owner of the entire drive to my user from root (using the recursive option) and it still says the owner is root and the programs still cant access it (I did use sudo)

 

Edit: Image of console output for ownership/permisions
f752a35350f20a2d66453f1b648e1f2e.png

How did you mount the drive?

 

I would try mounting it into a subdirectory of your home directory, rather than /mnt. It's quite possible that's where software like Discord expects your files to be. If the /mnt directory isn't searchable by non-root users that could also be a reason why software doesn't see the mounted directory, even if that directory has read permissions for others.

 

For example, something like

mkdir ~/mnt
sudo mount -t auto /dev/sdb1 ~/mnt

 

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×