Score:0

umask 027 and the sudo user

br flag

This is sort of a follow on question to What permissions would change if I change umask to 027 from 022?

Our IT has changed umask from the default 022 to 077 and then to 027 after enough complaints were received. The main issue I have with either 027 or 077 (it was changed in /etc/login.defs) is that the sudo user also grabs that umask which ends up breaking things in subtle and often infuriating ways. The main issues revolves around installing software / dev tools / libraries that require root privileges.

Normally the libraries will get installed in /usr/local which obviously requires the use of sudo. The main problem is when the sudo user has one of the higher umasks the files that get installed into /usr/local (and hence are owned by root and belongs to root's group) are unusable by me once the installation is complete. Yes I could go change the permission of all the files that get installed so they're readable by normal users, but that seems like a horrible solution (when I install software such as cmake, how am I suppose to track down all the files it installs?).

I guess I'm trying to figure out how those who advocating using a umask of 027 or 077 make it so sudo doesn't inherit that umask or how this problem is normally solved. I can't imagine it's an issue unique to us.

Possible answer here: Issue with umask UBUNTU 14.04.3

hr flag
The sudoers file has its own umask option - but to allow it to set a more permissive value than that inherited via PAM you need to set the umask_override property as well I think. See for example [Set sudo umask apart from the user calling it](https://unix.stackexchange.com/questions/265497/set-sudo-umask-apart-from-the-user-calling-it)
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.