I would like to
1) set umask values for the entire gnome session, comprising all applications (not just nautilus)
2) If possible I would like to do so userwise, allowing for different umask values for different users
As this is easily done for the bash I assume there must be a similar way for the GUI. After having searched the net the entire evening I found no tutorial neither for solving 1) and even less for 2).
Thanks in advance!!
Last edited by macaco (2016-01-18 21:29:29)
I've been wrestling with this issue on and off for months, and I'm not sure there's a way to get Gnome to respect a umask no matter how set. I've tried the conventional shell umask methods (adding it to .bashrc, /etc/profile, etc.), and they only work in the terminal. According to my research, that's to be expected as the traditional ways of setting umask only really affect shells, not necessarily xsessions. I also tried the .gnomerc method mentioned in prior threads with no success.
With modern distros the "correct" way to set a global umask for the whole system (for all software, not just shells) is to use the pam_umask.so module to set the umask in /etc/pam.d/system-auth (either directly or in login.defs). However, I tested the pam method, and nautilus (and gnome more generally) seems to completely ignore the pam umask, even though gdm allegedly pulls in the pam modules from system-auth. For comparison, I tested with XFCE and it appears to respect the pam umask, so this may just be another case of Gnome being non-standards compliant.
Looking at Gnome's bugzilla, apparently this is a known bug: https://bugzilla.gnome.org/show_bug.cgi?id=516429 . Unfortunately, it's been open since 2008 with no action, except that it appears that every few years someone will file a new bug reporting the issue which is then closed as a duplicate. There's a similar question to yours over on Stack Exchange that also has no answer unfortunately: http://unix.stackexchange.com/questions … me-session
Sorry I'm not more help.
Thanks for the thought, but that doesn't resolve my use case. I need to set a umask that's more permissive than the default (I want to default to 002 rather than 022), not less, so I don't think access controls would solve the issue.
It would be interesting where GNOME stores its own umask value.
Now I am not much of a programmer but if I download the source code of gdm, say via ABS, would there be an easy way to find the umask value in the code, edit it, and compile it "hard coded" the way I would like it to have?