[sf-lug] What purpose is served by the first two parts? (cd / && umask 022 ...

Rick Moen rick at linuxmafia.com
Sun Jan 1 14:17:26 PST 2017


Quoting Daniel Gimpelevich (daniel at gimpelevich.san-francisco.ca.us):
> On Sun, 2017-01-01 at 13:03 -0800, Michael Paoli wrote:
> 
> > umask 022
> > mostly precautionary - typically sufficiently but not excessive
> > default security for superuser (root) performing an operation such
> > as shutdown, software installation, etc.
> 
> This only has any effect on creation of files (and directories, since
> they are also files) which normally, a shutdown does not do.

Moreover, root should already have:

# umask
0022
#

If something's setting root's umask to something else, then d00d, you're
doin' it wrong.  ;->



More information about the sf-lug mailing list