[sudo-users] umask value getting Bitwise OR'ed when creating dir after running sudo
Todd C. Miller
Todd.Miller at courtesan.com
Tue Aug 9 10:55:14 EDT 2011
On Wed, 15 Jun 2011 19:07:49 +0530, Ravikumar VJ wrote:
> I am using sudo binary ( version 1.7.2p1 ) on RHEL 5 32 bit. I am
> observing a behavior where when I run sudo as user User1 , User1's umask
> value would be bitwise OR'ed with that of umask value of Real User's. IE ,
> umask of user1 after sudo = ( umask default value in /etc/sudoers file ) |
> real user's umask. How do I stop this union of umask values from happening?
> I want to use the exact umask value specified in the /etc/sudoers file.
By default, sudo will avoid making the umask more permissive (less
secure) than the user's existing setting. You can change this by
setting the "umask_override" option in sudoers. E.g.
More information about the sudo-users