View Issue Details

IDProjectCategoryView StatusLast Update
0003796Rocky-Linux-8systemdpublic2023-07-18 10:34
ReporterAsh Ak Assigned ToLouis Abel  
Status needinfoResolutionopen 
Summary0003796: Systemd--user does not inherit user umask set at login - defaults to 0022,
DescriptionWhen logged into a GNOME session, all applications opened using the GUI ie gedit, fileexplorer do not use the system set umask but default to a umask value of 022.

This works fine from a login shell with the correct permissions when creating a file in the users home directory, when a file is created from the gui the umask is different and results in incorrect permissions.
TagsNo tags attached.


Louis Abel

Louis Abel

2023-07-18 01:54

administrator   ~0004060

Thank you for the report.

This (unfortunately) sounds like normal behavior of systemd --user. In theory pam_umask can be used to set this, but it may not get inherited down the process tree.

I would recommend trying this, replacing <<UID>> and <<UMASK>> as needed.

% mkdir -p /etc/systemd/system/user@<<UID>>.service.d
% cat > /etc/systemd/system/user@<<UID>>.service.d/umask.conf<<EOF
% systemctl daemon-reload

After that, log out and back in. Or restart the system if all else fails.
Ash Ak

Ash Ak

2023-07-18 10:34

reporter   ~0004093

Hi Louis,
Thanks for the reply, have tried that and several other configurations but none seem to work. as you mention this is normal behaviour for Rocky 8.8, it does not seem to be present in other distro ie centos 7 which seems to inherit and keep the umask. It is important that umask is retained within a profile for all services/processes for consistency.

We have tested pam_umask which also does not work. This definately seems like a bug as the umask should be inherited from the global user setting. Could you please elaborate on normal behavious as i have not seen this previously.

We should be able to change this but it seems regardless of where we apply the umask setting, child processes do not inherit the umask. Do you know if the same behaviour is experienced in previous releases of Rocky Linux?

Issue History

Date Modified Username Field Change
2023-07-17 14:27 Ash Ak New Issue
2023-07-18 01:54 Louis Abel Assigned To => Louis Abel
2023-07-18 01:54 Louis Abel Status new => needinfo
2023-07-18 01:54 Louis Abel Note Added: 0004060
2023-07-18 10:34 Ash Ak Note Added: 0004093