I have created a file named ".xsessionrc" and it is in my home folder (~/.xsessionrc). Within this file I wrote this: umask 077.
No change is evident. I first tried a relogin. No effect. I then rebooted. Also no effect. Creating documents still results in rw-r--r--. (I am logging in with gnome display manager and opening documents from the gnome-shell interface, not from a terminal). Is there a specific entry that I should have made in the ~/.xsessionrc file? Should I "undo" the entries I made at /etc/login.defs and/or ~/.profile? Those are still set to 077 as I mentioned previously. So I have /etc/login.defs, ~/.profile and ~/.xsessionrc all with entry "umask 077". But the result is rw-r--r--. ----- Original Message ----- From: "Greg Wooledge" <wool...@eeg.ccf.org> To: debian-user@lists.debian.org Sent: Monday, August 7, 2017 11:37:24 AM Subject: Re: How to change default umask in Stretch? On Mon, Aug 07, 2017 at 03:25:27PM +0000, Garrett R. wrote: > I have set /etc/login.defs to a umask of 077. Also, I commented out the > USERGROUPS_ENAB entry. > > When I create gedit documents (for example), I am getting rw-r--r--. This > does not reflect umask 077. > > I then went to ~/.profile and set umask there. But this had no effect on > anything. OK, you're not going to give us any details without tooth-pulling. That sucks. I will have to rely upon guesswork. You used the word "login" and the word "gedit". This tells me that you may be concentrating, currently, one of the two following scenarios: 1) You login locally through a display manager into an X session. 2) You login locally on the Linux console and use startx to launch an X session. Now, we can probably rule out #2, because you claim that modifications to ~/.profile did not work. There are various situations where you *could* still be using console login + startx and have your changes in ~/.profile not take effect, but the simplest answer suggests you are not doing that. So, you're probably logging in through a display manager. If you want to configure the X session that you get when logging in through a Debian display manager, use the file ~/.xsessionrc instead of ~/.profile. See <https://wiki.debian.org/Xsession>. Yes, Virginia, ~/.xsessionrc does not exist by default. You would have to create it. (These days, users have to be *told* this for some reason. They whine and moan if you don't reassure them that yes, it's OK that a file doesn't exist and that they should create it. Sad but true. And this user top-posted, so I'm inclined to suspect he/she falls into that group.) No, I am not talking about ~/.xsession. ~/.xsessionrc is a totally different file.