I’ve setup th umask in “almost” every possible way, in the idea that at some point Nautilus (file manager) would create folders respecting the umask that I setup.
It fails all the time.
I tried in :
/etc/bashrc
/etc/profile
~/.bashrc
~/.bash_profile
in the parent systemd service of the parent process of Nautilus
etc…
How can we setup the umask for the whole gnome session ?
Just about everything ran within a gnome session is ran from systemd. To set the umask, pam_umask is an option for processes not launched by systemd. Another option is systemctl edit user@.service…
Using the above quoted method to change the umask also applies to root created files which I do not desire. Thus I had to edit root’s .bash_profile and add the line umask 0022 to revert to the system default. Now in the case of creating the override.conf in
I would want to check if this affects root. I don’t think you want files created by root world writeable
if ! shopt -q login_shell ; then # We're not a login shell
# Set default umask for non-login shell only if it is set to 0
[ `umask` -eq 0 ] && umask 022
So plain 0000 might not trivially get to non-login shells. That is separate from GUI though.
Interestingly, the documentation for RHEL 9 does not match that. Perhaps it did before RHEL 9.2.