You are not logged in.

#1 2010-11-25 19:01:52

nordog
Member
From: Iceland
Registered: 2009-02-22
Posts: 38

A few questions relating to umask

A few weeks back I put the line

# umask 027

in my ~/.bashrc file on my work machine to eliminate any possibility of my files being read by other users on the machine. Just recently, I compiled and installed the linux gpib driver from source and installed it, only to find that the python bindings seemed to be missing. The problem lay in the fact that I installed the driver via the sudo command and sudo inherited the umask settings from my .bashrc file rather than using the system umask set in /etc/profile. All the files created were therefore not readable by 'others'. I've found that I get similar behavior when I elevate my privileges using su.

Now for the questions:

1. Is there any way to have sudo inherit the umask of root, rather than using using the user's umask. I've noticed that the man page for sudoers contains a few words about the 'umask_override' setting which when set causes sudo to use the union of the user's umask and whatever umask is set to in the sudoers file. However, it also mentions that on systems that use PAM (Arch uses PAM by default, right?) "the default PAM configuration may specify its own umask which will override the value set in sudoers". I'd prefer that sudo would just inherit the roots umask rather than using the union anyway.

2. Where is the best place for a user to put the umask line? .bash_profile, .bashrc or somewhere else?

Any comments are much appreciated.

Offline

#2 2010-12-01 13:19:48

nordog
Member
From: Iceland
Registered: 2009-02-22
Posts: 38

Re: A few questions relating to umask

Perhaps this post belongs in some other category?

Offline

#3 2010-12-01 14:39:09

lymphatik
Member
From: Somewhere else
Registered: 2009-03-07
Posts: 119

Re: A few questions relating to umask

.

Last edited by lymphatik (2010-12-01 14:40:14)

Offline

Board footer

Powered by FluxBB