LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 07-21-2005, 08:21 AM   #1
duckboy
LQ Newbie
 
Registered: Jul 2004
Location: Sheffield, England
Distribution: Fedora Core 3 / Debian Sarge
Posts: 10

Rep: Reputation: 0
Question VFAT mount permissions


I've added a FAT32 partition to my fstab to automount the drive on start-up, as follows:

/dev/hda6 /share vfat defaults,umask=0000 0 0

I thought setting the umask to 0000 would ensure that the drive was r/w by everyone, but I'm still experiencing some odd behaviour where the permissions are still 0755 or 0644.

Is this a quirk of the 'still experimental FAT32 ALPHA' mount type, or is there actually some way of ensuring everything is writable?

What I actually want to do is set-up my Apache configuration to point to some websites on the shared mount, without the pain of having to copy them across the filesystems each time I want to switch development between Linux and Windoze (Just because I have to make sure what I'm doing is compatible with IE).

Any suggestions?
 
Old 07-21-2005, 09:49 AM   #2
aysiu
Senior Member
 
Registered: May 2005
Distribution: Ubuntu with IceWM
Posts: 1,776

Rep: Reputation: 66
Maybe give this a try?
http://ubuntuguide.org/#automountfat
 
Old 07-21-2005, 11:32 AM   #3
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Basically the word "defaults" you've included is giving you the problem. From "man mount"
Quote:
defaults
Use default options: rw, suid, dev, exec, auto, nouser,
and async.
 
Old 07-25-2005, 08:22 AM   #4
duckboy
LQ Newbie
 
Registered: Jul 2004
Location: Sheffield, England
Distribution: Fedora Core 3 / Debian Sarge
Posts: 10

Original Poster
Rep: Reputation: 0
Chinaman: That's not incredibly helpful. I looked in man mount for the different optiions, and didn't think that any of the 'defaults' options would cause any specific problems. Maybe you would like to specify what, precisely, it is about 'defaults' that will be causing me an issue.

Actually, after further investigation, I found that the permissions are correct for the files that matter, and have been able to link the FAT32 directories into my /var/www directory and specify the virtual hosts correctly (after having a few issues with SELinux). Where the permissions seem to get a bit odd is on a directory that is being used by WindozeXP as the "My Documents" directory.

I'll investigate further, anyhow. But for the time being, I've got things working how I want them.
 
Old 07-25-2005, 08:24 AM   #5
duckboy
LQ Newbie
 
Registered: Jul 2004
Location: Sheffield, England
Distribution: Fedora Core 3 / Debian Sarge
Posts: 10

Original Poster
Rep: Reputation: 0
Of course... Windows cries like a baby everytime I load up now. But I can live with that for having my essential files available in both O/S. One day, when I'm rich, I'll just buy enough 2nd user gear to set-up a small server and just use CVS or something better.
 
Old 07-25-2005, 08:39 AM   #6
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: Tupelo, MS
Distribution: Gentoo
Posts: 6,926

Rep: Reputation: 124Reputation: 124
Re: VFAT mount permissions

Quote:
Originally posted by duckboy
I thought setting the umask to 0000 would ensure that the drive was r/w by everyone, but I'm still experiencing some odd behaviour where the permissions are still 0755 or 0644.
Quote:
Originally posted by duckboy
Chinaman: That's not incredibly helpful. I looked in man mount for the different optiions, and didn't think that any of the 'defaults' options would cause any specific problems. Maybe you would like to specify what, precisely, it is about 'defaults' that will be causing me an issue.
From "man mount" ...
Code:
nouser Forbid an ordinary (i.e., non-root) user to mount the file system.  This is the default.
I have no problem automounting FAT32 partitions as user, with r/w priviledges.
Code:
/dev/hda3        /DATA            vfat        user,umask=1000,rw,auto  1   0
Of course, since you might miss this in the man page, too. If by everyone you mean more than one normal user (who can't be everyone since he's only one), you better add a s to user ... like this ... users
 
Old 07-26-2005, 04:56 AM   #7
duckboy
LQ Newbie
 
Registered: Jul 2004
Location: Sheffield, England
Distribution: Fedora Core 3 / Debian Sarge
Posts: 10

Original Poster
Rep: Reputation: 0
The partition is mounted during boot, which means it is mounted by root, therefore user/nouser permissions are actually irrelevant.

If I wanted an ordinary user to be able to unmount it or remount it when logged in, then I would need to set the attribute to users. But I don't.

As FAT32 (surprisingly) doesn't support UNIX permissions, the kernel handles this by using a umask to 'dummy' the permissions (or, in other words, to give Windows files pseudo-UNIX permissions). I gave the mount the "umask=0000" option, which sets the default permissions to 777 (actually, I'm not certain about how it treats sticky, suid, guid), I.E: anyone, regardless of who mounted the partition, can access the files on the partition. My original query was that the permissions on some directories and files were not 777, but 755 or 644, which is not what I would've expected.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
vfat file permissions Magusofdreams Linux - Newbie 6 03-11-2005 12:30 PM
vfat permissions problem JBB Linux - Newbie 5 03-03-2005 01:38 PM
mount --bind, vfat and permissions jobano Linux - General 0 05-24-2004 10:53 AM
mounted vfat permissions n3tw0rk Linux - General 3 12-05-2003 05:41 PM
vfat write permissions andrea.corelli Linux - General 4 04-23-2002 03:43 AM


All times are GMT -5. The time now is 01:47 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration