Fedora This forum is for the discussion of the Fedora Project. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-03-2006, 06:30 AM
|
#1
|
LQ Newbie
Registered: Apr 2006
Location: India
Distribution: Fedora Core 5
Posts: 13
Rep:
|
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.
|
|
|
08-03-2006, 07:16 AM
|
#2
|
Member
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851
Rep:
|
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
|
|
|
08-03-2006, 07:19 AM
|
#3
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
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..
|
|
|
08-30-2006, 03:05 AM
|
#4
|
LQ Newbie
Registered: Aug 2006
Location: France
Posts: 7
Rep:
|
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.
|
|
|
08-30-2006, 05:57 AM
|
#5
|
Member
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347
Rep:
|
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.
|
|
|
08-30-2006, 02:27 PM
|
#6
|
LQ Newbie
Registered: Aug 2006
Location: France
Posts: 7
Rep:
|
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
|
|
|
04-15-2007, 01:45 PM
|
#7
|
LQ Newbie
Registered: Apr 2006
Location: India
Distribution: Fedora Core 5
Posts: 13
Original Poster
Rep:
|
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
|
|
|
04-15-2007, 03:01 PM
|
#8
|
Senior Member
Registered: Oct 2003
Posts: 3,057
Rep:
|
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.
|
|
|
04-16-2007, 09:53 AM
|
#9
|
Senior Member
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070
Rep:
|
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>.
|
|
|
04-22-2007, 09:30 PM
|
#10
|
Member
Registered: Sep 2004
Location: Malaysia, Johor
Distribution: Dual boot MacOS X/Ubuntu 9.10
Posts: 851
Rep:
|
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,
|
|
|
All times are GMT -5. The time now is 07:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|