LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 05-12-2004, 06:21 PM   #1
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Rep: Reputation: 15
Making mounted FAT32 partition writable by all


Fedora Core 2, kernel 2.6.5-1.358. Dual boot WindowsXP and Fedora, with a small FAT32 partition set up to move files back and forth.

I have the FAT32 partition mounting off of fstab and I can read, write, rename and delete in it as root, but as a regular user, which I want to be most of the time, I can only seem to get read access.

At present, when I need to move a file into it logged in as a regular user, I am opening the Super User File Browser. Is there a way to set permissions on the mounted partition so that the user directly has full rights without having to get into any of the SU stuff????

If, logged in as root, I try right-clicking on the mounted folder, and changing the permissions (or owner) through the Property tab, the changes are not sticking or it says I'm not allowed to make them.

The entry in my fstab is:

/dev/hdc3 /mnt/LinTrans vfat defaults 0 0


Any advice will be greatly appreciated.
 
Old 05-12-2004, 06:31 PM   #2
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Original Poster
Rep: Reputation: 15
I see this now from earlier today, and it will probably get me close, but how would I alter it to allow read/write access to ALL users?

-------------------------------------

For the FAT32 partition try something like the following in /etc/fstab:



code:--------------------------------------------------------------------------------
/dev/hdXn /mnt/data vfat quiet,showexec=no,uid=floyd,umask=007 0 0
--------------------------------------------------------------------------------


Change the device and the mountpoint to correspond to your system.

Having every file with the permissions of 777 looks like the result of having "umask=000". Using the option of "showexec=no" will stop everything from being marked as executable.

Since you're the only user of the system then you can use the "uid=floyd" option, or whatever your user name is, so you can change the umask to "umask=007" to remove write access from other non-user uids. Other users being the system users that are used by various programs. This has no affect on the access to the FAT32 other than in linux.
 
Old 05-12-2004, 07:19 PM   #3
ben_build#2.1.0
Member
 
Registered: Apr 2004
Distribution: Fedora Core 3
Posts: 240

Rep: Reputation: 30
Re: Making mounted FAT32 partition writable by all

Quote:
Originally posted by jrittvo
/dev/hdc3 /mnt/LinTrans vfat defaults 0 0
try this:

Code:
/dev/hdc3   /mnt/LinTrans   vfat  user,rw    0 0
Having defaults under mout options gives you no permissions to mount the swap drive with anything other than root.

I included the rw option because rw stands for Read-Write, and I didn't know If you need that there on a swap drive.
 
Old 05-24-2004, 01:10 PM   #4
cristiroma
LQ Newbie
 
Registered: May 2004
Location: Bucharest, Romania
Distribution: Linux Slackware 9.1
Posts: 14

Rep: Reputation: 0
If you succeed with kernel 2.6.x please let mere mortal here know it works, as I suspect a problem in the vfat support. I trying for a week on a 2.6.6 to make it work and always get the same result - failure.

cristian.
 
Old 05-24-2004, 02:27 PM   #5
gandalf2041
Member
 
Registered: Jul 2003
Location: Sunny Florida, USA
Distribution: Ubuntu 6.06 LTS
Posts: 53

Rep: Reputation: 15
This is actually a design issue in vfat. It doesn't support Unix permissions; therefore, it will take the ownership of the user at mount time (this is why root works). Try changing your fstab entry to something like:

Code:
/dev/hdc3   /mnt/LinTrans   vfat  gid=<enter users gid here>,umask=000     0 0
take a look at the mount man page for more details.
 
Old 05-25-2004, 04:43 AM   #6
cristiroma
LQ Newbie
 
Registered: May 2004
Location: Bucharest, Romania
Distribution: Linux Slackware 9.1
Posts: 14

Rep: Reputation: 0
You are right, this works as you said for 2.4.x kernel, but for me, in 2.6 i cannot get it work.

For a reason it always mounts the directory with:

32K drwxr--r-- 18 root root 32K Jan 1 1970 fat_e

no matter what I write in fstab ( uid/gid/umask etc. )

Besides the rights, there is also the year: 1 Jan 1970, altough the date of files inside the fat_e directory preserve their original date.

Cheers.
 
Old 05-25-2004, 07:40 AM   #7
gandalf2041
Member
 
Registered: Jul 2003
Location: Sunny Florida, USA
Distribution: Ubuntu 6.06 LTS
Posts: 53

Rep: Reputation: 15
Thanks for setting me straight I wasn't aware that the behavior was different in the 2.6 kernel. Looks like I'll need to do some experimentation.
 
Old 05-27-2004, 10:56 PM   #8
tomhemba
LQ Newbie
 
Registered: Feb 2004
Location: Seattle
Distribution: Fedora
Posts: 23

Rep: Reputation: 15
I'm having the same problem. I can't figure out a way to make my vfat partition (for dual boot system) read/writable for anybody but root.

Anyone with a solution please let us know

Thomas
 
Old 05-27-2004, 11:10 PM   #9
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Original Poster
Rep: Reputation: 15
You need to use "umask" to control the permissions. "umask=000" grants rwx to all categories. You want to use the "rw" option too, to have it mounted as read/write. The umask=000 and rw end you up with rwxrwxrwx permissions. "root" will still show as owner and group, but you can copy a file off the VFAT drive and the owner and group will change to the user for the copy, if that is important to you. My fstab entry (that now works!!!) is:

/dev/hdc3 /mnt/LinTrans vfat rw,umask=000 0 0

(Note: this is working on a 2.6.5 kernel, too)

Last edited by jrittvo; 05-27-2004 at 11:12 PM.
 
Old 05-28-2004, 01:22 PM   #10
cristiroma
LQ Newbie
 
Registered: May 2004
Location: Bucharest, Romania
Distribution: Linux Slackware 9.1
Posts: 14

Rep: Reputation: 0
This is like twilight zone
I could swear that yesterday didn't work no matter what I wrote in fstab and today put your entry and worked.
Don't know if matters but last night i resized that vfat partition.

Anyway...thanks a lot!

Cristian.
 
Old 05-28-2004, 09:07 PM   #11
tomhemba
LQ Newbie
 
Registered: Feb 2004
Location: Seattle
Distribution: Fedora
Posts: 23

Rep: Reputation: 15
Hmmm. What am I doing wrong?? I still can't get it to work. This is what I'm doing:

I log in as user

I use su to mount hda5 thus:
mount /dev/hda5 /home/files

Then I go into fstab and add this line (per suggestion above):
/dev/hda5 /home/files vfat rw,umask=000 0 0

Then I log out and log back in again as user and I'm not able to write to hda5.

Any suggestions??

Thomas
 
Old 05-28-2004, 09:17 PM   #12
jrittvo
Member
 
Registered: Apr 2004
Location: NJ, USA
Distribution: Fedora
Posts: 82

Original Poster
Rep: Reputation: 15
You need the line in fstab when you BOOT. fstab doesn't get "loaded" when you just login/out.

Once you save your fstab with that line in it, and you do a full reboot, you won't even need to do the mount command any more. fstab will do the mounting for you at boot time, every time, and it will stay mounted even as users or root log in or out.

The umask permissions didn't get applied for you because they only get applied if they are in your fstab when you BOOT.
 
Old 05-28-2004, 11:11 PM   #13
tomhemba
LQ Newbie
 
Registered: Feb 2004
Location: Seattle
Distribution: Fedora
Posts: 23

Rep: Reputation: 15
Thanks. That was it. Now it's working like a charm.

While were on the topic, do you know if it is possible to mount this vfat partition at the /home directory. I tried to do this (after getting the rw permissions to work) and users were no longer able to log in.

Thomas
 
Old 05-29-2004, 02:30 AM   #14
cristiroma
LQ Newbie
 
Registered: May 2004
Location: Bucharest, Romania
Distribution: Linux Slackware 9.1
Posts: 14

Rep: Reputation: 0
You can mount a partition in any dir you want to, but notice that mounting a partition within a directory you can no longer access the old content of the directory ( what was before mount ) until unmount that partition. Why would you mount the vfat in "/home" ?
 
Old 06-07-2004, 02:39 AM   #15
xenithi
LQ Newbie
 
Registered: Jun 2004
Location: up there, look!
Distribution: SuSE Pro 9.0
Posts: 7

Rep: Reputation: 0
could anybody help?

now i have this fat32 partition.. i can read/write to it fine in any user.


i just wanted to put the /usr and /home to that partition. i've put a symlink.

problem is the owner of the files in that partition is always 'root'. but even if i log in root, i can't change the owner of a file there.

so i can't log in on my regular user cause 'root' owns my /home directory in that partition.
 
  


Reply


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
Making an NFTS partition writable stynhx9000 Ubuntu 4 11-03-2005 07:35 AM
FAT32 partition ro...but not mounted ro SaurianOverlord Linux - Newbie 15 04-12-2005 10:32 PM
NTFS partition cannot be mounted after converting from FAT32 aweir14150 Mandriva 5 01-27-2005 03:11 PM
problem executing scripts on mounted fat32 partition roald Linux - General 8 06-14-2004 06:02 AM
permissions and mounted fat32 partition ianunderwood Linux - Newbie 8 06-25-2003 05:17 AM

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

All times are GMT -5. The time now is 01:31 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