This question started as Changing file permissions on USB external hard drive but as I can find a solution I ask again.

The problem comes when I move a USB drive I have been using in Ubuntu 10.04 to a lapto with 12.04. I want to change permissions of some scripts as they appear only with rw but I can't.

Now I have tried to copy the device line from fstab from 10.04 to the laptop with 12.04 but still get an error message.

Error mounting: mount exited with exit code 1: helper failed with:
mount: only root can mount /dev/sdb1 on /media/FREECOM HDD

The line I add to fstab to try to mount the usb drive is

/dev/sdb1 /media/FREECOM\040HDD vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush 0 0

When restoring original fstab and plugging the usb drive the output of mount is

/dev/sdb1 on /media/FREECOM HDD type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)

What should I add in fstab to get the drive fully working? I wanted to change permissions on files in the usb drive.

Output of sudo fdisk -l

Device     Start      End      Blocks  Id  System
/dev/sdd1              63  1953520064   976760001    c  W95 FAT32 (LBA)

Thanks again

  • I have had similar problems with mounting hard disks, when the hard-disk/file-system had become corrupted. Can you check whether, it is accessible from some other system? Is the problem only on your installation of Ubuntu? ps: I couldn't find a way to comment on the question that's why put it as an answer... :) – Vignesh Jul 3 '12 at 6:10

I've successfully used /etc/fstab to auto mount a usb device located at sdb1 using the following:

/dev/sdb1 /media/Test ntfs-3g defaults,user,exec,uid=1000,gid=100,umask=000 0 0

With this configuration, I've mounted the device having all privileges over its files.

  • Replace /dev/sdb1 with your device

  • Replace /media/Test with your target directory

  • Replace ntfs-3g with your USB drive file system

Related reading: Fstab - Community Ubuntu Documentation

My goal was more or less the same as yours, to have an USB drive with an executable file that performs some updates, either on my home PC or my work PC.

  • Thank you very much, it works fine. All the files in the drive are now executable, I don't need all of them to be but now I can read, write and exec scripts both at home and work. – pacomet Jul 3 '12 at 19:24

Try to add "user" to the mount options

/dev/sdb1 /media/FREECOM\040HDD vfat rw,user,nosuid,nodev,uhelper=udisks,utf8=1,flush 0 0
  • Hi, it seems not to work. When I try to mount the drive it gives an error message "Error mounting: mount exited with exit code 1: helper failed with: mount: mount point /media/FREECOM HDD does not exist" – pacomet Jun 14 '12 at 17:33
  • Have you checked if the mount moint (directory) exists? Otherwise you should create it with mkdir /media/FREECOM\ HDD – mbs Jun 15 '12 at 7:42
  • Hi and sorry for the delay in answering. After creating the mount point and adding the line to fstab now every file in the drive has the following permissions and ownership -rwxr-xr-x 1 paco root. I have created a simple script to list a directory but I can't execute any script in the USB drive. I need to run scripts on it as I sometimes I have to work at home. Thanks. – pacomet Jun 25 '12 at 12:40

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.