[Gllug] How to set umask
Garry Heaton
garry at heaton6.freeserve.co.uk
Sun Aug 1 20:01:18 UTC 2004
>I'm assuming it's not something silly like you're not using bash...
>Try to put the "umask 022" into ~/.bashrc (see bottom of "man bash" for
>list of files).
>> Prey tell, what is the mystery of setting the default umask?
>You can use /etc/profile for a system-wide default, though if you have
>existing users on the box they might get a surprise if you change it.
>Stig
Only /etc/bashrc makes mention of umask so I commented out:
if ["`id -gn`" = "`id -un`" -a `id -u` -gt 99]; then
umask 002
else
umask 022
fi
... and replaced it with :
umask 022
It worked at next login but I'm sure there's a hidden catch :-( as I haven't
a clue what the if,else condition refers to. Still can't work out why my
.bash_profile and .bashrc entries didn't over-ride this setting.
Garry
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list