in reply to Creating a directory.

I don't understand.. What is unmask? I read the documentation, but I don't get it..

Replies are listed 'Best First'.
RE: Re: Creating a directory.
by BBQ (Curate) on Jun 20, 2000 at 08:32 UTC
    Its umask and not unmask. You can find more documentation on it by refering to the bash_builtins via the umask manpages. Try man umask on your console. Its a good doc, very yummy. I'd recommend reading it entirely. For what its worth, here's the scoop from ~ line 1450 or so.
    umask [-p] [-S] [mode] The user file-creation mask is set to mode. If mode begins with a digit, it is interpreted as an octal number; otherwise it is interpreted as a sym­ bolic mode mask similar to that accepted by chmod(1). If mode is omitted, or if the -S option is supplied, the current value of the mask is printed. The -S option causes the mask to be printed in symbolic form; the default output is an octal number. If the -p option is supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is 0 if the mode was successfully changed or if no mode argu­ ment was supplied, and false otherwise.
    HTH!

    #!/home/bbq/bin/perl
    # Trust no1!
RE: Re: Creating a directory.
by husker (Chaplain) on Jun 20, 2000 at 19:15 UTC
    umask, in short, says "when creating afile or directory, do NOT set the following bits that I have set in my umask". So a umask of 002 says "do not set the world WRITE bit during a create, even if they say to set it". A umask of 077 would say "never set any bits for world or group". You can go ahead and explicitly set those bits with chmod after the file is created if you want. It's just a rudimentary security tool thing ... to make sure people don't go around creating 777 files without knowing it. Most umasks only mask the world access bits, and sometimes group access bits.