0

I want to know what are the mount options that I require to mount a USB flash drive. sudo mount -t auto -L ultra_fit ~/usb_flash -o ? I mount it and when I try to cd to a folder within the drive, it states "Permission Denied."

To clarify, what are the correct mount options to use when mounting a USB flash drive?

3
  • You can't even create a directory without sudo so I don't think you would be able to create the directory in your home drive. Also you will need sudo to mount the drive. Why don't you talk to your administrator and ask them to help you? Or why do you not have access to sudo?
    – Dylan
    Commented Mar 21, 2015 at 17:16
  • I can create directories without using sudo in my home directory. You need to use sudo to create directories outside your home directory, for example under /. Also, I'm a home user, supposedly I'm the administrator of my own computer. Commented Mar 21, 2015 at 17:19
  • Anyways, I do have access to sudo. Commented Mar 21, 2015 at 17:26

1 Answer 1

0

To make the directory issue:

mkdir ~/newDirectory

Then attempt to mount the drive, after mounting the drive you will need to use the chmod command to assign the appropriate permissions or chown to make yourself the owner, whichever you feel is appropriate.

However you will need sudo to do so.

You said you are unable to use sudo but then go on to state you are the administrator. What is the output when you issue sudo su and press return and use the password for your user account?

EDIT You added a comment you are able to use sudo so does this eliminate your problem? Are you now able to mount and access the drives as you want?

EDIT 2 Try this -

mkdir ~/newDirectory
sudo chmod o+rw,g+rw,o+rw ~/newDirectory
sudo mount /dev/sdx ~/newDirectory

Then cd to your new directory and see if you are able to access the files

8
  • I read somewhere that you can mount a drive (for example, /cdrom) without using sudo. I just wanted to know if I can accomplish the same with my USB flash drive. If not, then that's okay. Commented Mar 21, 2015 at 17:40
  • In regards to your method of chmod/chown, is this the same as using "mount -o uid=antman,gid=antman" or are they different? What if I go to another *nix computer, would I have to chmod/chown again to access my USB flash drive? Commented Mar 21, 2015 at 17:46
  • No if you set the owner when you mount it you will not have to use chown. Those parameters you used on mount are specific to that specific action, so even if you took the usb drive out and put it back in to the same computer you would have to run the same command again. So yes if you take the usb drive out and put it in a different computer you would have to enter that command again. Now if you make a directory, make yourself the owner and always mount your usb to that directory you will not have to use chown everytime.
    – Dylan
    Commented Mar 21, 2015 at 18:03
  • I am not convinced chown or chmod will work on a filesystem that does not have ownership and permissions in that way (e.g. FAT32) – permissions and the user/group are set in the mount as @manofsteelx says. Commented Mar 21, 2015 at 20:09
  • I had no idea this was a FAT32 usb drive. But that is irrelevant, you are changing the ownership and permissions on the directory on the linux filesystem not on the USB flash drive
    – Dylan
    Commented Mar 21, 2015 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .