LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   unable to write to vfat partition as non-root (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-write-to-vfat-partition-as-non-root-283851/)

aducarrab 01-29-2005 06:03 PM

unable to write to vfat partition as non-root
 
I have the following line in my fstab to mount hdb1;

/dev/hdb1 /mnt/hdb1 vfat auto,user,noexec,rw,sync 0 0

Works fine as root but no write access as normal user. I've tried unmounting and setting /mnt/hdb1 directory permission to 660 but when i remount it changes back to 500. I'm guessing I'm missing an option in the fstab line that would set default permission for this drive to 660, how should I change the entry?

Thusfar I've obtained info on this from here;
http://www.tuxfiles.org/linuxhelp/fstab.html
was a great start but no mention of the permission setting.

thks

cs-cam 01-29-2005 06:09 PM

After sync add umask=0 like so
Code:

auto,user,noexec,rw,sync,umask=0
:)

aducarrab 01-29-2005 06:53 PM

what exactly is the umask=0 doing? i have write access as a normal user now, but now everything I copy to this partition gets it's permissions changed to rwxrwxrwx and I get an error message saying, "could not change permissions for /mnt/hdb1/test.txt" - this despite the fact that permissions apparently WERE changed.

michaelk 01-29-2005 07:04 PM

vfat does not do permissions like a linux filesystem. The umask=000 options sets read/write permissions for all which is why you see rwxrwxrwx. umask is the reverse of chmod in its bit settings. i.e. 0 is set. You can not use chmod to change permissions.

aducarrab 01-29-2005 07:08 PM

got it on the file permissions. so I just have to live with the error message every time i drag a file into this drive?


All times are GMT -5. The time now is 04:29 PM.