[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Coercing sane file permissions -- site specific



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, Nov 19, 2016 at 12:51:58PM -0600, Richard Owlett wrote:
> I use fat16 and fat32 formatted USB flash drives for _EXACTLY_ *ONE*
> purpose.
> It is to transfer data to/from a Windows machine.
> There is NO [nor will there ever be] a network connection between
> them.
> 
> When I plug one into my Debian machine I want totally unfettered
> read/write access.
> [when logged in as root or *ANY* user ID]
> 
> 
> HOW?
> {any one notice a tone of frustration ;/}

Use the "umask" option when mounting the file system. Umask is
supposed to be the bits *not* to set in the file permissions.

That would be

  mount /dev/foo mnt -oumask=000

(of course just 0 would suffice. Old rituals and that ;-)

For more options, you separate them with comma, like so

  mount /dev/foo mnt -ouid=richard,gid=richard,umask=003

supposing you want the files to belong to user (uid) "richard" and
group (gid) "richard" and want to take away write perm from others.

The details are in the "mount" man page, under "FILESYSTEM SPECIFIC
MOUNT OPTIONS", "Mount options for fat".

You can set the options in the fstab, if you make an entry there
(fourth field, see man fstab).

regards
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlgwtwwACgkQBcgs9XrR2kapJQCdGT1YIv/58eaI49xxqp4SuDV9
WyAAoIEduiIOmQk7TBnAUOt+9kbZg1+/
=wo6m
-----END PGP SIGNATURE-----


Reply to: