[NBLUG/talk] Adding a used second HDD
Jeremy Turner
jeremy at linuxwebguy.com
Wed Nov 17 19:15:13 PST 2004
On Wed, Nov 17, 2004 at 11:39:54AM -0800, Mitch Patenaude wrote:
> mount -t vfat -o rw,uid=bob,gid=bob,umask=022 /dev/hdd1 /scratch
>
> that will mount the volume with all files owned by user 'bob', (owned
> by group 'bob' too.. that's gid), and set to permissions -rwxr-xr-x
> (the umask is an inverse of the permissions.)
I also will add that the 'umask' option is taken from the current
environment. If your .bash_profile already has a line of 'umask 022',
then you really don't need it in the mount command line. I also think
that 'rw' is a default, so you really don't need that either:
mount -t vfat -o uid=bob,gid=bob /dev/hdd1 /scratch
'should' work. You just can't change permissions on individual files.
Note that if you copy /scratch/foobar to your ext3 partition, it will
keep the same file permissions as how you mounted /dev/hdd1. So in this
case if you copy over /scratch/foobar to /home/bob, the file
/home/bob/foobar will be chmod 755. You can work around this by setting
the umask, dmask, and fmask options on a vfat filesystem. dmask for
directory, and fmask for ordinary files:
mount -t vfat -o uid=bob,gid=bob,dmask=755,fmask=644 /dev/hdd1 /scratch
More that you needed to know about mount. =)
Jeremy
More information about the talk
mailing list