Fedora 9: Read-only access to non-root user on a vfat partition
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
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.
Fedora 9: Read-only access to non-root user on a vfat partition
Problem:
I get this error message when trying to make a directory on a vfat partition as a NON-ROOT user. As Root, it works without problems:
[abhi@sulphur1 ~]$ mkdir /media/SHARED/bb
mkdir: cannot create directory `/media/SHARED/bb': Permission denied
Additional Info:
- The partition in question is vfat formatted. My intent was to create 4 partitions for this dual-boot machine... XP, Linux, Swap, Shared. This is the 'Shared' partition... with it's purpose being to act like a common storage medium between reboots of Win and Fedora.
- I can write to the ntfs XP partition just fine as a non-root user. The problem is only with the vfat partiton. The nfts partition just has the "defaults" option in fstab.
- fdisk -l output:
Device Boot Start End Blocks Id System
/dev/sda1 * 1 4889 36960808+ 7 HPFS/NTFS
/dev/sda2 9564 10337 5851440 12 Compaq diagnostics
/dev/sda3 4890 9563 35335440 f W95 Ext'd (LBA)
/dev/sda5 8074 9563 11264368+ b W95 FAT32
/dev/sda6 4890 4917 200781 83 Linux
/dev/sda7 4917 8073 23864526 8e Linux LVM
Troubleshooting Done:
- Added this line to /etc/fstab followed by a "mount -o remount /dev/sda5":
/dev/sda5 /media/SHARED defaults,user,exec,dev,suid,sgid,uid=500,gid=500,mode=0775,umask=000
- changed owner of both the directory /media/SHARED and /dev/sda5 to user "abhi". "abhi has uid of 500.
[abhi@sulphur1 ~]$ ls -la /dev/sda5
brw-rw---- 1 abhi disk 8, 5 2008-08-29 12:53 /dev/sda5
[abhi@sulphur1 ~]$ ls -la /media/
drwxr-xr-x 6 root abhi 8192 2008-08-29 14:41 SHARED
- Reverted changes to defaults in /etc/fstab. Here is what the mount command gives presently:
[abhi@sulphur1 ~]$ mount
.
removed other info
.
/dev/sda5 on /media/SHARED type vfat (rw,umask=0000)
Any guidance on how i can give non-root users "write permissions" on this vfat partition would be appreicated.
Have you really a group named abhi ? Isn't it a user name rather than a group name ?
The permissions give only write access to root, even if a group named abhi exists.
Hi, thank you for your replies and helping me out. The problem is solved. Here's what was done:
a. remove everything from fstab that i had modified.
b. mkdir /media/SHARED
c. chown abhi /media/SHARED
d. Added this in the fstab file and followed it with a mount -a:
/dev/sda5 /media/SHARED vfat defaults,rw,nosuid,nodev,uhelper=hal,uid=500 0 0
e. rebooted to make sure the changes persisted... and they do! I can write to the vfat partition now as a non-root user.
Have you really a group named abhi ? Isn't it a user name rather than a group name ?
The permissions give only write access to root, even if a group named abhi exists.
In Fedora, whenever one adds a user to the system, a corresponding group is also created. reflected with the gid being the same as the uid in /etc/passwd and /etc/group. In this case, the group "abhi" has gid 500.
<<The permissions give only write access to root>>
I too feel that was the problem. ref my previous post, that chown command fixed this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.