[TriLUG] changing owner/permissions on a mounted file system

Jeremy Portzer jeremyp at pobox.com
Wed Jan 14 10:39:22 EST 2004


I think was discussed on #trilug IRC channel yesterday, were you there?

As we said, the problem is that vfat, the FAT32 (or FAT16) Windows
filesystem, does not support permissions.  It just doesn't -- there's
nothing that Linux can do about this.  (Well, there are fancy schemes
such as UMSDOS but that's difficult.)

All you can do is set the mount options, either on the mount command
line, or in /etc/fstab, so that all files are owned by a particular user
with particular permissions.  There is no way to specify different
permissions for different files in the filesystem -- a square peg
doens't go in a round hole, there's nothing you can do about it.

Really, the answers to your questions are in the man page for "mount". 
Scroll down to the "Mount options for fat" section.  You will see that
the first few options -- uid, umask, fmask, etc pertain to your
situation.

As with any mount options, you can pass them to the command-line mount
command with the -o flag, or include them in the options section of
/etc/fstab.   I recommend the latter once you determine what you want
the permanent options to be like.

Hope this helps,
Jeremy

On Wed, 2004-01-14 at 09:45, Chris Bullock wrote:
> Got a new(to me) 250GB drive and slapped it into my dual-boot(Mandrake, 
> Win98) machine.  I formated and mounted the drive as VFAT in order for 
> my Windows part to see the drive and mounted it as var/ftp.  Problem is 
> that I can't change the permissions.  If I do a chown cgb:cgb /var/ftp, 
> I get a operation not permitted error.
> 
> Someone told me to edit my fstab to the mount it as the correct owner.  
> That would be a possibility, but I would like to have the chance to 
> change it from the command-line if I feel to do so.
> 
> Also, would it be wrong for root to be owner but chmod 777, if I was the 
> only one accessing the machine?
> 
> What is the best resolution for my situation?
> thanks,
> --chris
-- 
/---------------------------------------------------------------------\
| Jeremy Portzer        jeremyp at pobox.com      trilug.org/~jeremy     |
| GPG Fingerprint: 712D 77C7 AB2D 2130 989F  E135 6F9F F7BC CC1A 7B92 |
\---------------------------------------------------------------------/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://www.trilug.org/pipermail/trilug/attachments/20040114/b46a5592/attachment.pgp>


More information about the TriLUG mailing list