This proves that 'gnome-terminal-server' has the wrong 0022 umask, although it is started by 'systemd' in user mode with the right 0007 umask.
This seems to point the bad 'umask=0022' hardcoding inside 'gnome-terminal-server' and/or inside the method defined by GNOME to start 'gnome-terminal-server' through the 'dbus' service.
Anyway, this bad 'umask=0022' hardcoding, which must be corrected, is somewhere inside GNOME.
Lot of thanks to Reuben Thomas for having discovered, reported and dug the issue.
'gnome-terminal' version 3.20.2-1ubuntu8 from 'Ubuntu 17.04' seems to have the same issue, which I have reported at https:/ /bugs.launchpad .net/ubuntu/ +source/ gnome-terminal/ +bug/1685754 :
$ GTS_PID=$(pidof gnome-terminal- server)
$ PARENT_PID=$(ps --no-header -o ppid $GTS_PID | sed -e 's/ //g')
$ ps n -fp $GTS_PID, $PARENT_ PID systemd --user gnome-terminal/ gnome-terminal- server
UID PID PPID C STIME TTY STAT TIME CMD
1001 2551 1 0 avril27 ? Ss 0:00 /lib/systemd/
1001 4812 2551 0 avril27 ? Ssl 0:10 /usr/lib/
$ grep -e Name -e Umask /proc/{ $GTS_PID, $PARENT_ PID}/status | sort status: Name: systemd status: Umask: 0007 status: Name: gnome-terminal- status: Umask: 0022
/proc/2551/
/proc/2551/
/proc/4812/
/proc/4812/
$ cat /usr/share/ dbus-1/ services/ org.gnome. Terminal. service gnome.Terminal gnome-terminal- server. service lib/gnome- terminal/ gnome-terminal- server
[D-BUS Service]
Name=org.
SystemdService=
Exec=/usr/
This proves that 'gnome- terminal- server' has the wrong 0022 umask, although it is started by 'systemd' in user mode with the right 0007 umask.
This seems to point the bad 'umask=0022' hardcoding inside 'gnome- terminal- server' and/or inside the method defined by GNOME to start 'gnome- terminal- server' through the 'dbus' service.
Anyway, this bad 'umask=0022' hardcoding, which must be corrected, is somewhere inside GNOME.