Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Umask

by Lhamo Latso (Scribe)
on Apr 03, 2003 at 16:07 UTC ( [id://247798]=note: print w/replies, xml ) Need Help??


in reply to More permanent umask ?

I usually setup my umask value in my login rc. For KSH, that is in "$HOME/.profile". For CSH, "$HOME/.login". For Bash, "$HOME/.bash_profile". That works well because your login shell will be the parent of all the sub-processes you create, and receive a copy of that environment.

"umask 022" or "umask 0022" is the default when not specified. This equates to "chmod 644".

# umask 0022 # touch test # ls -l test -rw-r--r-- 1 root root 0 Apr 3 10:04 test

I normally set it to "umask 002", allowing members of my group to have write access to anything I create, resulting in "chmod 664".

# umask 002 # umask 0002 # touch test # ls -l test -rw-rw-r-- 1 root root 0 Apr 3 10:06 test

Verify what is currently active with "umask" and no arguments.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://247798]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (4)
As of 2024-04-25 18:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found