You are not logged in.

#1 2016-01-18 21:27:11

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

set umask for GNOME

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).

Any suggestions?

Thanks in advance!!

Last edited by macaco (2016-01-18 21:29:29)

Offline

#2 2016-01-20 01:41:59

mwillems
Member
Registered: 2014-08-09
Posts: 89

Re: set umask for GNOME

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.

Offline

#3 2016-01-20 13:02:24

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,911

Re: set umask for GNOME

Sounds like you want to restrict access to some parts of the filesystem.
Maybe you could use Access_Control_Lists instead of umask ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#4 2016-01-21 00:37:19

mwillems
Member
Registered: 2014-08-09
Posts: 89

Re: set umask for GNOME

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.

Offline

#5 2016-01-23 22:55:12

macaco
Member
From: Graz, Austria
Registered: 2009-03-22
Posts: 101

Re: set umask for GNOME

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?

Offline

Board footer

Powered by FluxBB