Take the 2-minute tour ×  I recently upgrading to Snow Leopard.
I have noticed that some files written by MacPorts are installed
with the wrong permission -- they are written with a umask of
0077. I think I have narrowed down the problem:    1. The port
command is invoked via sudo.   2. My .bashrc file specifies a
umask of 0077.   3. On older versions of OS X (10.5 and below),
sudo used the umask of the root user (which was 0022); however,
now it uses my umask of 0077.  Is there anyway to have sudo use
the old behavior? Right now, it's kind of annoying because I
have to use sudo to run simple commands like port installed,
port outdated, etc.  (The problem is described in more detail in
this MacPorts ticket.)   I discovered the umask option for sudo,
and in /etc/sudoers I added the following line:  Defaults
umask=0022  However, this did not function as desired, because
the real umask used by sudo is the union of the user mask with
this default mask.  share|improve this question add comment  5
Answers  up vote