LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   making a vfat mount point writeable for users (https://www.linuxquestions.org/questions/linux-newbie-8/making-a-vfat-mount-point-writeable-for-users-52381/)

stevenhasty 03-29-2003 01:29 PM

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

loke137 03-29-2003 01:35 PM

chmod 755 as user doesnt help?

stevenhasty 03-29-2003 01:49 PM

Nope, I can't seem to give users permission to write to the mount point even from root. "Operation not permitted."

loke137 03-29-2003 03:16 PM

you are writing to vfat or NTFS( the later is not well supported, meaning only experimental!)

stevenhasty 03-29-2003 03:29 PM

vfat ...

cuckoopint 03-29-2003 04:24 PM

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.

stevenhasty 03-29-2003 06:38 PM

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?

cuckoopint 03-29-2003 06:50 PM

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')

stevenhasty 03-29-2003 06:55 PM

I had yet to learn there is a man page for all these things. From now on, I'll try that first...

cuckoopint 03-29-2003 06:59 PM

man topic
info topic
apropos topic

^all very useful. Also, the "See Also" sections are sometimes helpful to look for further info.

stevenhasty 03-29-2003 07:00 PM

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 ...

cuckoopint 03-29-2003 08:17 PM

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.

stevenhasty 03-29-2003 11:01 PM

umask=000 works great. Thanks.

stevenhasty 03-30-2003 03:19 PM

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?

cuckoopint 03-30-2003 03:50 PM

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)

cuckoopint 03-30-2003 03:52 PM

btw, what is the output of (in terms of permissions):

ls -l /mnt/windows
ls -ld /mnt/windows

stevenhasty 03-31-2003 05:43 PM

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.

cuckoopint 03-31-2003 06:28 PM

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?

cuckoopint 03-31-2003 06:31 PM

umm....btw, did you make the group of /mnt/files 'users' yourself?
and lastly, do you use any gid/uid when mounting?

stevenhasty 03-31-2003 08:18 PM

/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 ...

stevenhasty 03-31-2003 08:26 PM

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.

cuckoopint 03-31-2003 08:38 PM

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...

stevenhasty 03-31-2003 08:44 PM

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

cuckoopint 03-31-2003 08:57 PM

man mount:

Quote:

debug Turn on the debug flag. A version string and a list of file system parameters will be printed (these data are also printed if the parameters appear to be inconsistent).
what's messing with my head is not even root has write permissions. the same thing happens if you mount manually with root?

cuckoopint 03-31-2003 09:02 PM

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

stevenhasty 03-31-2003 09:05 PM

yes, works in root.
now i'm going to check to see if it will work in automount for users.

stevenhasty 03-31-2003 09:09 PM

perfect! thanks!

cuckoopint 03-31-2003 09:30 PM

cool.


All times are GMT -5. The time now is 10:49 PM.