I am trying to set up a directory that is shared by two local users. I created a new group that both users belong to and a directory that is read and writable by anyone in the group.
Unfortunately, when I use gui file managers launched by gnome to create new directories in the shared directory, they do not have the group write bit set and the other user cannot write inside the just created directory.
The problem seems to be that for programs launched by gnome, the umask is set to 022 instead of 002, which means the group write bit is not set for anything newly created in those programs. If I set the umask to 002 in my .profile, everything works for directories created using the terminal, however gnome does not respect that setting.
to /etc/systemd/system/user@.service.d/override.conf by calling
sudo systemctl edit user@.service
Unfortunately this did not work for me. It did not seem to have any effect on my system, umask was still 022. Does anyone know why the above did not change the umask and how I could fix this?
@pureness589 Hi, systemd uses priorities, so it should be prefaced by a number to override any default, just a name will got to the end of the list… Try 10-override.conf and see if that makes a difference.
Do you also happen to know what the significance of the comment in the common-session-pc is?
It says:
This file is autogenerated by pam-config. All manual changes will be overwritten!
[...]
Never edit or delete common-*-pc or postlogin-*-pc files!
And there is an instruction for creating PAM configuration files:
# The pam-config configuration files can be used as template
# for an own PAM configuration not managed by pam-config:
#
# for i in account auth password session session-nonlogin; do \
# rm -f common-$i; sed '/^#.*/d' common-$i-pc > common-$i; \
# done
# for i in account auth password session; do \
# rm -f postlogin-$i; sed '/^#.*/d' postlogin-$i-pc > postlogin-$i; \
# done
I have to admit, I have no experience with PAM and I don’t really know what those commands do, so are you able to point me towards what I should be doing here? Is it fine to just leave the edit in common-session-pc? Or do I have to create my own files with the above instructions?
It does what it says! Each time pam-config is executed your changes will be overwritten. Replace the link common-session by a file with the same name and proper content: