[wplug] chmod and windows partition

Rob Jefferson rlj at andrew.cmu.edu
Mon Sep 15 16:13:17 EDT 2003


On Mon, 15 Sep 2003, John Harrold wrote:

> the uid is the user id of root, and the umask contains the permissions of
> the mount point in octal form (see the manpage for mount). i'm not really
> sure about the 077 thing. i would think that would turn off read, write and
> execute permissions for the user but turn them on for the group and the
> world. i think what you want here is 770.

It's a mask, not an explicit permission.  In general, the umask is used to
set the initial permissions of a file, by AND-ing the permissions with the
complement of the umask (think subtraction). So, the non-negative bits
are ignored by any file creation/access process.  In the case of 077:

The owner can do everything (the 0 masks no permissions);
The group and the world can do nothing (the 7 masks all permissions);

If the umask were, say, 022, and we created a file, we'd get:

The owner can do everything (again, the zero masks nothing);
The group and world can read and execute (the 2 masks writing, leaving the
4 for the reading and 1 for execution).

If you think of it like 777-077=700 or 777-022=755 respectively, it makes
more sense.

So in this case, 077 would be right if you didn't want anyone other than
the user accessing the mount.

rob



More information about the wplug mailing list