LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   vfat ownership (https://www.linuxquestions.org/questions/linux-newbie-8/vfat-ownership-96272/)

weiss 09-24-2003 08:57 AM

vfat ownership
 
I have a vfat partition and it is mounted at boot time, it is set to supermount (Mandrake 9.1). I log on under my account (not root!), however, the owner of all files on the vfat partition is still root and it is impossible to change the ownership with 'su' and 'chown' - it says permission denied.

My goal is to have the vfat partition mounted at boot time and have myself (not root) be the owner of all files there. Is it possible? If so, what should I do to achieve it. Thanks!

DrOzz 09-24-2003 09:00 AM

you'll have to add an extra option in the /etc/fstab file for the entry to mount the fat drive...
both options below will work, you only need to use one of them, but remember the UID option is only going to specify one user, and the umask is for all if you have multiple users....
umask=000
and.
UID=XXX where XXX is the user ID of the user that wants access (in this case you :D)

weiss 09-24-2003 09:16 AM

Hmm, as long as I remember "umask 0 0 0" is already there (i can't check it now unfortunately since it is on my PC at home). But I will check it this evening!

DrOzz 09-24-2003 09:30 AM

well maybe if you tried to do it before and you actually typed 'umask 0 0 0' then thats probably why its not working....it is umask=000, all as one string..
but like you said, just check it out when you get home..

aaa 09-24-2003 09:59 AM

It's umask=0 (there doesn't have to be 3 zeroes). The umask=0 0 0 you saw is umask=0 with two other zeroes that have nothing to do with it. The umask=0 will set all permissions on the drive to rwxrwxrwx.

Demonbane 09-24-2003 12:23 PM

vfat doesn't support ownerships, therefore whoever mounted the partition owns everything.
You'll have to add "users,noauto" option to the fstab, then mount it yourself with some kind of script after you login.

DrOzz 09-24-2003 02:25 PM

negative...if he automounts at bootup it with the proper options anyone can access it

aaa 09-24-2003 02:29 PM

Anyone can access it, but it's still owned by root.

weiss 09-25-2003 02:30 AM

Well, I have checked it yesterday. By default it was

/dev/hda5 /data vfat iocharset=utf8,umask=0 0 0

i made it first like

/dev/hda5 /data vfat iocharset=utf8,defaults,umask=000 0 0

and it did not work, any ideas why ?

then I made it like

/dev/hda5 /data vfat iocharset=utf8,umask=000,defaults,uid=501 0 0

and only then it worked

Again, the problem was not in accessing vfat, the problem was with the ownership of the files like aaa said.

But why can it not be done in such a way that the files on vfat are owned by the user who logs on ?

Anyways, thank you everybody for your help!


All times are GMT -5. The time now is 03:52 PM.