On Mon, 18 Oct 1999, Marcus Sundberg wrote:
> Ketil Froyn wrote:
> > If Andrew's umask is 007 as normal user, and he does a su (ie. not a
> > 'su -'), then the umask will still be 007, no? If this is so, mkdir will
> > then make dirs with mode 770.
> No, as mkdir (as of GNU fileutils 4.0 at least) uses a mode of 0755
> the resulting mode would be 0750 if the umask was 0007.
I don't agree. From 'info mkdir':
`-m MODE'
`--mode=MODE'
Set the mode of created directories to MODE, which is symbolic as
in `chmod' and uses 0777 (read, write and execute allowed for
everyone) minus the bits set in the umask for the point of the
departure. *Note File permissions::.
If I understood this right, mkdir makes dirs with permissions
set to 0777-UMASK, which in Andrew's case would be 0770 if his umask is
0007. If this doc is wrong or not updated or whatever, I'll shut up. :) I
have GNU fileutils 4.0.
--
Ketil Froyn The probability of someone
University of Oslo watching you is proportional
Norway to the stupidity of your action.