Index
Subject
: Re: LUG: Another Ubuntu Puzzle
From
: Ed Anderson <nilbus@nilbus.[redacted]>
Date
: Wed, 16 Nov 2005 11:24:56 -0500
Parent
Brian is right, since the fat32 filesystem can't store information about file
permissions, it's useless to try and set them with chmod. Instead you need to
set the initial permissions at mount time, in /etc/fstab.
In 'man mount', search for 'Mount options for fat'. You'll see that you can set
the uid to own all the files. uid=username
Alternatively, you can set the files world-writable (not so safe) by setting the
umask=000
An example fstab line might look like:
/dev/disk /mnt/fat32 vfat uid=yourUsername 0 0
You could also set it to be mountable by the user, instead of at boot, and then
it would take the permissions of whichever user mounted it:
/dev/disk /mnt/fat32 vfat user 0 0
Man mount is useful ;)
Hope this helps.
Ed
On 16/11/05 09:53 -0500, Brian Pike wrote:
> Remember that FAT32 is a filesystem from the single-user, DOS era.
> Files don't have the same metadata that a file on any modern Unix
> filesystem would have. Wikipedia says that the attributes are only
> read-only, hidden, system, archive, and volume name (with no stored
> permissions). If you ask chmod to set the execute bit on a file in a
> FAT32 system, I'm honestly not sure what it'll do since there's no
> execute attribute to set. Note also that every file on that
> filesystem will be owned by a single user and group.
> Second, check the options set for these filesystems in /etc/fstab,
> especially uid, gid, umask, dmask, fmask, and noexec (see mount(8) and
> search for 'fat'). If there's a umask set on the entire filesystem,
> then you may be seeing odd behaviors.
> I performed your 'touch test; chmod 722 test' operation, and
> apparently the permissions are set to 700 only temporarily. Upon
> remounting the filesystem, the permissions are 755. I'm not sure why
> that sort of surprising behavior is intended.
> Hope that helps,
> -Brian
>
> On 11/15/05, Ken Whichard <[1]wwhichard@nc.rr.[redacted]> wrote:
>
> As I've said before - lots of Solaris SA experience but Ubuntu is
> confusing the old man!
> Have added a second hard disk to the box running Ubuntu.
> Partitioned it into two partitions fat32. I think I have mounted
> them since I can cd to each and add files from within Ubuntu.
> When I try to ftp from another box, I can list the files on the
> partitions but cannot write to the partitions.
> Sure enough the permissions are 755 on each of them. No problem, I
> sudo chmod 777 - should fix the problem, nope, now they are 744!
> OK, I'll fix that - set a root password, su to root and run chmod
> again - same result. It seems I cannot set either partition's
> permissions to include write for group or world.
> Even this -- I touch test on one of the partitions, then chmod 722
> test and the permissions are -rwx------ ! Go figure
> OK - what the heck am I doing wrong?
> A puzzled class of '61 grad!
> Ken Whichard
>
> References
>
> 1. mailto:wwhichard@nc.rr.[redacted]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
iD8DBQFDe11XTSt8lGmh/8QRAvYAAKCBsEJvwCgJ3uV7fjaJxsoeEW0XUwCfVrfK
JeHQslnrvPb93czCsSidO0A=
=P0Ju
-----END PGP SIGNATURE-----