LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux 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


Reply
  Search this Thread
Old 08-22-2004, 01:41 PM   #1
kringla
LQ Newbie
 
Registered: Aug 2004
Posts: 6

Rep: Reputation: 0
permission for vfat partition


I know this is not a new subject since I see that others have problems with setting correct parameters for vfat partitions in /etc/fstab. I tried several things as suggested in different threads, read the man and googled.

Well, here we go. I am able to mount the partition as either root or user. Only root has write permission and this is the problem. I want to give every user on my system write perm. I created a group (winuser - ugly name, will change this in a soon future to something nicer) that has gid=1003. All users (two) are placed in that group.

Kernel 2.6.8
mount-2.12
udev

Stuff from /etc/fstab about the partition I am trying to mount.
/dev/hda4 /mnt/lagring vfat quiet,user,rw,exec,gid=1003,umask=000,fmask=000,auto 0 0
(is this a little insecure or what...)

Well, output from mount shows:
/dev/hda4 on /mnt/lagring type vfat (rw,nosuid,nodev,quiet,gid=1003,umask=000,fmask=000,user=my_username_were_here)

I have also tried with some simpler lines like:
/dev/hda4 /mnt/lagring vfat defaults,umask=000 0 0
without success.
 
Old 08-22-2004, 01:56 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
In addition to messing around with fstab you also need to set the permissions and ownership for the mount point. You have to umount the mount point, set the permissions and ownership, and remount the mount point.

umount /mnt/lagring
chmod 777 /mnt/lagring
chown username:groupname /mnt/lagring
mount -t vfat /dev/hda4 /mnt/lagring

You may have to set the permissions and ownership for /mnt also. Or you can sidestep that issue by creating a unique mount point:

mkdir /lagring
chmod 777 /lagring
chown username:groupname /lagring
mount -t vfat /dev/hda4 /lagring

Then set up /lagring in /etc/fstab



-------------------
Steve Stites
 
Old 08-22-2004, 03:09 PM   #3
kringla
LQ Newbie
 
Registered: Aug 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for the quick an thorough reply.

I tried everything you suggested but ended up with the same result as ever: permission denied.

When not mounted: drwxrwxrwx 2 root winuser 48 2004-08-22 22:00 lagring/
When mounted simple AND from my fstab: drwxr-xr-x 16 root root 32K 1970-01-01 01:00 lagring/
(also: check the date on the folder, i created it some minutes ago in / as suggested).

I have also tried to add a codepage (codepage=437) as recomended in url below. No write permission anyway.
http://www.ussg.iu.edu/hypermail/lin...08.0/1579.html


Last edited by kringla; 08-22-2004 at 05:22 PM.
 
Old 08-22-2004, 05:43 PM   #4
kringla
LQ Newbie
 
Registered: Aug 2004
Posts: 6

Original Poster
Rep: Reputation: 0
Now I have write permission!
I think the problem was that i had two mounted directories, I used the option bind to do that, and for some reason those mounted folders kept the partition "lagring" from properly unmounting or something.

So when i umounted my other partitions and remounted the vfat partition with "codepage=437" I got write permission.
It feels like both a stupid user-error and something other wierd thing. I asumed that the bind:ed folders would automaticaly be umounted when I umount their "parent" partition. But I was wrong.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get write permission to vfat Chomper Linux - General 9 01-12-2005 11:38 PM
Permission problems in a vfat shared partition ReachingFarr Linux - Newbie 4 10-04-2004 07:09 AM
vfat execute permission Akuji Slackware 3 08-20-2004 12:38 PM
strange vfat permission problem nObRaIn Linux - Newbie 2 12-29-2003 07:20 AM
vfat partition - write permission for users group digitized_funk Linux - Newbie 8 03-19-2003 07:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration