Search code examples
permissionsdebiangnome-3umask

How can I set default umask in gnome on Debian-Stretch?


I would like the permissions on files that I create with gnome apps (e.g., gedit and libreoffice) to respect the umask I set.

I have set umask to 027 in ~/.profile and /etc/login.defs. I've also followed the directions from here by adding a line to /etc/pam.d/common-session: How to set system wide umask?

Nothing is working.

I am able to get the umask setting to work if I create files in vi or nano from gnome-terminal (after setting umask 027 in .bashrc). But I would like to get this umask respected in gnome apps like gedit also.


Solution

  • Gnome applications in question are likely launched by systemd user instance, which sets the umask to 022 regardless the umask configured using PAM.

    This question has also been asked on U&L SE and has more answers there.