Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 29th August 2008, 12:25 PM
tacman08 Offline
Registered User
 
Join Date: Aug 2008
Posts: 2
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

Version:
H/w: Lenovo Thinkpad t61, centrino duo, 1 gig ram
S/w: Fedora 9. #uname -a = Linux sulphur1 2.6.25.14-108.fc9.i686 #1 SMP Mon Aug 4 14:08:11 EDT 2008 i686 i686 i386 GNU/Linux

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,m ode=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.

Thank you!
Reply With Quote
  #2  
Old 29th August 2008, 02:32 PM
BenCollver2 Offline
Registered User
 
Join Date: Aug 2008
Posts: 13
You might try umount /media/SHARED first. I tried your mount options and got the following error.

mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

If you want to give non-root users write permission then the following mount options should do it.
defaults,user,gid=100,umask=0002

By the way, my VFAT partition is automatically mounted with me as owner when I log in. Does yours do the same if you remove the whole /media/SHARED entry from /etc/fstab?
Reply With Quote
  #3  
Old 29th August 2008, 07:32 PM
tacman08 Offline
Registered User
 
Join Date: Aug 2008
Posts: 2
Hi... Fixed!
Thanks for replying to my query and for your help.

<<You might try umount /media/SHARED first. I tried your mount options and got the following error.>>

- I had tried unmounting and rebooting. was a no go.
- I'm not getting those errors about the bad superblock.

<<If you want to give non-root users write permission then the following mount options should do it.
defaults,user,gid=100,umask=0002>>

- I tried this; however I still get the same error message:

[abhi@sulpher1 ~]$ mkdir /media/SHARED/aaa
mkdir: cannot create directory `/media/SHARED/aaa': Permission denied

- The fstab file contained this:
/dev/sda5 /media/SHARED vfat defaults,user,gid=100,umask=0002 0 0

- The user abhi was added to 100 in /etc/group and the gid option seemed to have taken effect as can be seen below:
[abhi@sulpher1 ~]$ ls -la /media/
drwxrwxr-x 5 root users 8192 1970-01-01 05:30 SHARED

- I then changed the mount options by adding the uid=500 option:
[abhi@sulpher1 ~]$ mount
/dev/sda5 on /media/SHARED type vfat (rw,noexec,nosuid,nodev,uid=500,gid=100,umask=0002 )

[abhi@sulpher1 ~]$ ls -la /media/
drwxrwxr-x 5 abhi users 8192 1970-01-01 05:30 SHARED

<<By the way, my VFAT partition is automatically mounted with me as owner when I log in. Does yours do the same if you remove the whole /media/SHARED entry from /etc/fstab?>>

- The VFAT partition isn't getting automatically mounted... I need to automount without any intervention as the partition contains pidgin, thunderbird and firefox profiles and all apps fail to work correctly unless the partition is mounted before they are launched.

- It does get mounted (as read-write for non-root) with the following options once i click on "SHARED" in the K-menu and then enter the root password when prompted:
rw,nosuid,nodev,uhelper=hal,uid=500


- So, I took a que from this and did these...
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.
Reply With Quote
Reply

Tags
access, fedora, nonroot, partition, readonly, user, vfat

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want read-write network access on vfat partition Jonathan Wexler Using Fedora 2 1st August 2008 01:37 PM


Current GMT-time: 07:21 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat