LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-03-2006, 06:30 AM   #1
rajeev1982
LQ Newbie
 
Registered: Apr 2006
Location: India
Distribution: Fedora Core 5
Posts: 13

Rep: Reputation: 0
Unhappy not able to write to vfat partition with non-root id


Hi All,
I have FC5 installed on my Dell Inspiron 1300. I have a FAT32 partitions which I want to share between windows and linux. From linu, I am able to read and write on FAT32 partition with root userid, but not with anyother userid. If I try to write from anyother user id I get error "Permission denied". Please let me know how to make it writable for other users. I tried to change the permission for the direcotries but no luck, I am not able to do so.

Thanks in advance,

Last edited by rajeev1982; 08-03-2006 at 06:34 AM.
 
Old 08-03-2006, 07:16 AM   #2
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
add this entry in your /etc/fstab

/dev/hda5 /data vfat defaults,uid=user1,rw

change /dev/hda5 to match your fat32 partition, user1 to your linux username
It should work well
 
Old 08-03-2006, 07:19 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
One could use umask= in place of uid= too, but if uid= works, it might be better stick with it. I've only used umask= so I can't tell the exact difference between these two..
 
Old 08-30-2006, 03:05 AM   #4
Petrous
LQ Newbie
 
Registered: Aug 2006
Location: France
Posts: 7

Rep: Reputation: 0
Hello,

I have the same problem in FC5 : only root can write in vfat partition.

The proposed solution does not work for me : as root, I have edited
/etc/fstab and tried usmas=0 and uid=user : no effect.

Of course, I had done before chmod a+w on the mounting point : not applied!

Suggestion(s) welcome.
 
Old 08-30-2006, 05:57 AM   #5
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
I'm not in FC5 at the moment but in FC4 I've got
noauto,users,rw

I think I'm using the same in FC5

They're both writable by user, the only difference is FC4 mounts at boot and FC5 doesn't.
 
Old 08-30-2006, 02:27 PM   #6
Petrous
LQ Newbie
 
Registered: Aug 2006
Location: France
Posts: 7

Rep: Reputation: 0
I found the solution at bobpeers.com :

/dev/hda2 /mnt/fat vfat auto,rw,uid=0,gid=500,showexec,quiet,fmask=117,dmask=007 0 0

the parameters are explained on bobpeers.com
 
Old 04-15-2007, 01:45 PM   #7
rajeev1982
LQ Newbie
 
Registered: Apr 2006
Location: India
Distribution: Fedora Core 5
Posts: 13

Original Poster
Rep: Reputation: 0
I have tried

/dev/hda2 /mnt/fat vfat auto,rw,uid=0,gid=500,showexec,quiet,fmask=117,dmask=007 0 0

and lots of other things also, but did not work. can anybody tell me some solution to this.

Thanks
 
Old 04-15-2007, 03:01 PM   #8
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Since you have few posts and maybe kind of new at linux, I won't assume that you realize the obvious for me.
In the example that was given, they used the partition of /dev/hda2 and a folder called /mnt/fat. You need to make any changes to work for your system.
For example, I made a vfat partition /dev/sda6 and a folder called /mnt/test
Redhat / Fedora makes the first user with user id of 500 and group id of 500 . You can verify that by running the id command:
For example: id fred
uid=500(fred) gid=500(fred) groups=500(fred)

If you want more users to access the vfat partition, it's easiest to make them part of the same group when they are created.
For example: useradd -g 500 tim

Now, as root user, I can add an entry in /etc/fstab.
Code:
To make it writable for users with a group id of 500, edit the /etc/fstab file to include the following line.
 /dev/sda6 /mnt/test  vfat gid=500,umask=002 0 0

To make  complete control for users with a group id of 500, try something like this in the fstab....
/dev/sda6 /mnt/test vfat gid=500,umask=000 1 0

To give one user complete control of that directory, try something like this in the fstab....
/dev/sda6 /mnt/test vfat uid=500,gid=500,umask=000 1 0
Don't forget, those are examples and you need to use the correct partition name and folder name.
 
Old 04-16-2007, 09:53 AM   #9
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
One thing you might want to do is run a chkdsk <drive:> /f on your FAT32 partition in Windows. I seem to remember that fixing the same problem I once had.

I think the equivalent linux command is: fsck.vfat -a <partition>.
 
Old 04-22-2007, 09:30 PM   #10
kstan
Member
 
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851

Rep: Reputation: 31
rajeev1982

the uid must equal your username or userid in /etc/passwd. Please make sure. uid=0 is root uid not normal user.

Good luck,
Regards,
 
  


Reply

Tags
access, fc5, partition, vfat, write


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Full write access to vfat Rªdical_£D SUSE / openSUSE 2 03-18-2005 03:15 AM
Can't get write permission to vfat Chomper Linux - General 9 01-12-2005 11:38 PM
Can't write to vfat partition as user sigma957 Slackware 6 07-29-2004 08:58 AM
Can't write to vfat and ntfs partitions linuxfond Linux - Newbie 7 11-12-2003 04:54 PM
vfat write permissions andrea.corelli Linux - General 4 04-23-2002 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:13 AM.

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