Ketil Froyn wrote:
>
> 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::.
Huh? Could someone who speaks native English parse this sentence:
"MODE uses 0777 minus the bits set in the umask for the point of the
departure."
Who is departing, and where??? ;)
> 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.
Well, regardless of what the info page is trying to say mkdir(2)
creates directories with (mode & ~umask), and mkdir(1) from fileutils
4.0 uses a mode of 0755.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan/
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: [EMAIL PROTECTED]