making a vfat mount point writeable for users
Running redhat 8.0 psyche. I checked out the man page on editing fstab, but I don't think this has what I want, which is to automount my shared partition (shared with windows, not a system partition) and make it writeable for users. I made it automount, but I'm not sure how to go about making it writeable. When I try to change the write permissions or group settings on the mount folder in X logged in as root, it says I don't have permission, and the same happened when I tried a chmod. The mount point, for reference, is /mnt/files and the partition is /dev/hda6 and my fstab file says this:
/dev/hda6 /mnt/files vfat auto,user 0 0 |
chmod 755 as user doesnt help?
|
Nope, I can't seem to give users permission to write to the mount point even from root. "Operation not permitted."
|
you are writing to vfat or NTFS( the later is not well supported, meaning only experimental!)
|
vfat ...
|
well, first try setting 'rw' option explicitly with the others.
ie. user,auto,rw Second, you may want to look at 'man mount'. The things that stand out the most are the entries for 'user' (and what it does), and under "Mount options for fat" you may need to set the umask explicitly. |
alright, I changed the options to include gid=100,rw,users and I'm still not able to change write permissions as root or be able to write as a normal user or a user within the group assigned to the mount point. I looked in man mount, but it does not explain what values to assign to umask, other than state that the value must be an octal. What is umask and what value would I set it to?
|
man umask
the easiest hack would be umask=000 and will work in most cases (unless you have serious security issues - then do the math. If you don't know how to handle the numbers also check out 'man chmod') |
I had yet to learn there is a man page for all these things. From now on, I'll try that first...
|
man topic
info topic apropos topic ^all very useful. Also, the "See Also" sections are sometimes helpful to look for further info. |
hmmm ... when I tried man umask all I got was a listing of bash commands. I'm going to try the umask=000 since security issues are not very important ...
|
Well, I was going to post you mine, but i just did a google search since I remembered there are many manpages that have been compiled for net use. For example:
http://www.hmug.org/man/2/umask.html yeah, umask=000 should work, while umask=022 would give user writes, but no one else. |
umask=000 works great. Thanks.
|
Alright, I've got the mount point writeable, but I can't get my permissions to stick on directories within the mount point. How would I make all files under the mount point writeable on startup?
|
two things I can think of:
1. your gid/uid is funky (what is it right now?) 2. your permissions on the mounted directory are funky (ie. ls -l /mnt/windows - or whatever it may be) |
btw, what is the output of (in terms of permissions):
ls -l /mnt/windows ls -ld /mnt/windows |
a bunch of dr-xr-xr-x for the first one, even when logged in as root
drwxrwxrwx 14 root users 16384 Dec 31 1969 /mnt/files for the second. |
Can you post your fstab line as it stands right now? and let me get this straight, everything mounts just dandy at boot time, only there is no write permissions? what do you do next? does chmod'ing it help?
On a side not, turn off the auto option and mount it manually with all the option you used in the fstab. any errors? |
umm....btw, did you make the group of /mnt/files 'users' yourself?
and lastly, do you use any gid/uid when mounting? |
/dev/hda6 /mnt/files vfat auto,users,rw,exec,suid,gid=100,umask=000 0 0
this is what it says right now, and yes I added gid=100 myself. chmod'ing helps, yes, if I am logged in as root. give me a minute and i'll turn off the auto and manually mount it ... |
OK, manually mounting it,
mount -t vfat -O rw /dev/hda6 /mnt/files had the same results: all files under the mount point were 0555. and if I chmod everything, it loses permissions when I unmount the filesystem. |
umount /dev/hda6 #if mounted
manually mount it again, using -O debug,users,rw,exec,suid,gid=100,umask=000 see if that helps to figure out the problem. I'm running out of ideas, and I don't have a fat partition to play with... the only thing I can right now think of is the debug option plus playing with your gid (how well does it work if you leave out the gid?) Maybe someone will come along, if this still doesn't help... |
when I mounted manually, I left out the gid, again no write perms.
what does debug do? and I tried this: cd /mnt/files chmod 0777 * and it gave me a bunch of errors and only made everything 0755: chmod: changing permissions of `dir_name' (requested: 0777, actual: 0755): Operation not permitted |
man mount:
Quote:
|
play around with what options are selected. From doing some searching, this _should_ work:
mount -t vfat -o users,rw,exec,umask=000 /dev/hda6 /mnt/files |
yes, works in root.
now i'm going to check to see if it will work in automount for users. |
perfect! thanks!
|
cool.
|
All times are GMT -5. The time now is 10:49 PM. |