Changing file permissions on USB external hard drive [duplicate]
I am using an external USB hard drive for a long time in Ubuntu 10.04, both at work and at home. Now I've installed 12.04 at home. Today I used the USB drive for the first time. I can read the disk but can't change the permissions of a file I wanted.
Output of "mount"
/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)
I try
sudo chmod u+w bsst-hdf_to_bsst-h5
and I get
-rw-r--r-- 1 paco paco 2956 dic 19 10:27 bsst-hdf_to_bsst-h5
Any ideas would be appreciated. Thanks in advance.
Hi again and sorry for the delay in answering. 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 pluging 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.
Thanks again
sudo chown -R $USER:$USER /media/FREECOM
I see that your disk is vfat, which unfortunately does not support file permissions win the current revision, unless you want to reformt it in UMDOS, which has been disconntinued and requires an older kernel. However, this may help get you
Ubuntu, and Linux in general, unfortunately have spotty permissios under other filesystems, especially on external disks, even without VFAT.
You may try these two other answers(In order of preference):
How do I set executable permissions on a removable drive?
https://superuser.com/questions/134438/how-to-set-default-permissions-for-automounted-fat-drives-in-ubuntu-9-10