Linux - GeneralThis forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
So i just formatted and reinstalled FC3. For some reason i can't get write-permission to the vfat part of my harddrive (my linux is sharing this with windows 2000 pro). I had this problem before. I'm asking for help now before i have a chance to screw anything up. At the moment, only the root can write and delete stuff from my the vfat drive. Here is my fstab
Code:
# This file is edited by fstab-sync - see 'man fstab-sync' for details
LABEL=/ / ext3 defaults 1 1
none /dev/pts devpts gid=5,mode=620 0 0
none /dev/shm tmpfs defaults 0 0
none /proc proc defaults 0 0
none /sys sysfs defaults 0 0
/dev/hdb3 /thepit vfat defaults 0 0
/dev/hdb2 swap swap defaults 0 0
/dev/hdd /media/cdrom auto pamconsole,exec,noauto,managed 0 0
/dev/hdc /media/cdrecorder auto pamconsole,exec,noauto,managed 0 0
/dev/fd0 /media/floppy auto pamconsole,exec,noauto,managed 0 0
I have the filesystem mounted to a folder called /thepit . You can see it here:
Code:
ls -l
drwxr-xr-x 15 root root 32768 Dec 31 1969 thepit
Things i have tried (logged in as su from a terminal window) are:
Code:
[root@rdrt-164-107-205-128 /]# chmod 777 thepit
[root@rdrt-164-107-205-128 /]# ls -l
drwxr-xr-x 15 root root 32768 Dec 31 1969 thepit
Nothing changed
Code:
[root@rdrt-164-107-205-128 /]# chgrp chomper thepit
chgrp: changing group of `thepit': Operation not permitted
doesn't work either
I've tried other things but in the interest of keeping this post moderately short, i won't list them all. Any help that anyone could offer on this would be greatly appreciated. I don't want to have to log in a root every time i want to write to this filesystem. Thanks in advance...
So i made the changes you just told me. The only thing that has changed is that now the drive shows up as its own icon in the "computer" window. i still cannot write to the disc from my non-root account. I tried to chmod and chgrp the folder but i get the same thing as before. any more ideas?
This looks just like a problem over in software.
Here's how my entry in the /etc/fstab looks. The entry is for /dev/hdb1 fat partition.
After making the changes in your /etc/fstab, this is one of those rare occasions where you might need to reboot for things to take effect.
To make it writable for users with a group id of 500, edit the /etc/fstab file to include the following line /dev/hdb1 /mnt/win vfat gid=500,umask=002 0 0
To give the user complete control of that directory, try something like this in the fstab....
/dev/hdb1 /mnt/win vfat uid=500,gid=500,umask=000 1 0
So i messed around with my fstab like you told me and IT WORKS!!! Thank you very much! That problem has been killing me for about a month. As a follow-up:
I noticed that by adding either umask=002 or gid=500, i was able to gain write-access to the disk. I only needed one or the other. I was hoping someone could explain to me exactly what both of those mean. I have a good idea that gid=500 tells the computer that the people in the group with group id 500 are allowed to access the disk. I know Chomper (me/my group) has a group id of 500. umask on the other hand, i don't know. I've seen umask=000, umask=0000, umask=002....what does all of this mean? Thanks for helping me out!!
Glad you got it working!
uid is the user id and gid is the group id. If you have more than one user, then put those users into a group and use that gid in the fstab. A quick way to find out that info for user ( fred )
is to type: id fred
Basically, umask changes the permissions of folders and files. You can experiment with results in your home directory and a file which you created. For example: echo mudd > test.txt
Then type: ls -l *.txt and different flavors of chmod to see how things change.
For example: chmod 0755 test.txt
ls -l *.txt
As you learned, the chmod command doesn't work for some non-native file systems. You need to include the information as options in the mount command, or the /etc/fstab entry.
If you wanted to use file permissions of 'rw_rw_rw' for files and 'rwxrwxrwx' for directories, you could use the 'fmask' and 'dmask' options rather than the 'umask' option.
For publicly writable partitions, you may want to forbid execution access on the partition. There are also 'noexec', 'nodev' and 'nosuid' options. These three options are implied if you use the 'users' option, however, if you don't want a any normal user to be able to unmount the filesystem, you will need to supply these options seperately.
Also, for the 'uid=' option, you can use your user name instead of having to look up your UID number.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.