Sample Header Ad - 728x90

umask value leaked when logging in into a different account

1 vote
1 answer
30 views
[user@localhost ~]$ umask
027
$ sudo su -
[root@localhost ~]# umask
0027

[root@localhost ~]# exit
[user@localhost ~]$ umask 0022
[user@localhost ~]$ umask
0022

$ sudo su -
[root@localhost ~]# umask
0022
I thought su - is supposed to clear environment variables and start a login shell, yet umask is not cleared. Why?
Asked by AvidSeeker (43 rep)
Jan 9, 2025, 06:00 AM
Last activity: Jan 9, 2025, 08:51 AM