Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am having trouble changing permission on a directory which is actually and entire drive that I mount automatically at startup. I created the fstab entry to be read/write and user accessible, but this does not happen. When I try to change the permissions or the ownership as root, I get an access denied error. This seems strange to me as I thought root should be able to do whatever it wanted. I have tried this both through terminal and by logging into x as root, but with the same result each time. The only thing I can think of is it must be something to do with how I am mounting the drive, the fstab entry looks like this: /dev/sdb1 /home/user/data vfat rw,auto,user,sync 0 0.
Any help with this would be appreciated, thanks in advance,
KrimsonKing
Last edited by krimsonking; 06-24-2007 at 12:22 AM.
The problem here is vfat. It has no knowledge of Linux
ownerships and permissions; what you want to do is to add
a umask=0000 entry to the rw,auto,user,sync bit ...
Given the device and filesystem on the drive, I'll guess that this is a removable drive usb or firewire drive. If that is the case, you may want to use the "noauto" option instead. Also, for fat32 mass storage drives, it is best not to have execute permissions on files. But you need the "x" bit set for directories to be able to enter them. To do this you need to use the "fmask" and "dmask" options instead of "umask".
Another problem is that if you were to add another usb drive, the next time you boot up the same partition might be assigned to another device. So, instead of using a device entry in fstab, use either "LABEL=alabel" or "UUID=fs_uuid".
I'll do it myself right now to walk you through the process:
I just inserted a USB Cruzer mini pendrive into the laptop. Let's see what the FS_UUID number is:
I added the uid=, and user option to allow me to mount it as a regular user. The fsmask and dmask options I chose will give the mounted partition r/w permissions for user "jschiwal" but if another user "gest" were to mount it, he wouldn't be able to enter the directory without using sudo ( or another computer).
Also, reinserting two pendrives, the device used was /dev/sdd1 instead. Entering "mount /mnt/cr256" mounted it anyway.
Hi, thanks to both tinkster and jschiwal for your help, adding the umask=0000 entry to fstab has worked great. Sorry jschiwal, I should have specified that I was using an internal SATA disk, the reason for the fat32 filesystem is that the disk in question gets shared with my Windows system, and as I'm still a noob on linux I like to keep my options open
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.