Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #184823

Re: How to change default umask in Stretch?

From "Garrett R." <grtrbsn83@unseen.is>
Newsgroups linux.debian.user
Subject Re: How to change default umask in Stretch?
Date 2017-08-07 18:10 +0200
Message-ID <ubSLq-2uu-73@gated-at.bofh.it> (permalink)
References <ubAOu-72y-21@gated-at.bofh.it> <ubIiZ-3Cw-5@gated-at.bofh.it> <ubS8G-1Uh-13@gated-at.bofh.it> <ubSim-1Ys-23@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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" <wooledg@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.

Back to linux.debian.user | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-06 23:00 +0200
  Re: How to change default umask in Stretch? Dennis Creedan <wingman619@gmail.com> - 2017-08-07 06:20 +0200
  Re: How to change default umask in Stretch? Felix Miata <mrmazda@earthlink.net> - 2017-08-07 07:00 +0200
    Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 17:30 +0200
      Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 17:40 +0200
        Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 17:50 +0200
          Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 19:20 +0200
            Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 20:10 +0200
              Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 20:10 +0200
                Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 20:40 +0200
                Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 21:10 +0200
                Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 22:10 +0200
                Re: How to change default umask in Stretch? David Wright <deblis@lionunicorn.co.uk> - 2017-08-07 22:50 +0200
                Re: How to change default umask in Stretch? Reco <recoverym4n@gmail.com> - 2017-08-08 12:30 +0200
                Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-09 14:10 +0200
                Re: How to change default umask in Stretch? Reco <recoverym4n@gmail.com> - 2017-08-10 07:20 +0200
                Re: How to change default umask in Stretch? Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2017-08-12 10:20 +0200
                Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-09 14:40 +0200
                Re: How to change default umask in Stretch? Henrique de Moraes Holschuh <hmh@debian.org> - 2017-08-07 23:20 +0200
                Re: How to change default umask in Stretch? Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2017-08-12 11:10 +0200
                Re: How to change default umask in Stretch? Henrique de Moraes Holschuh <hmh@debian.org> - 2017-08-12 14:30 +0200
                Re: How to change default umask in Stretch? Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2017-08-12 22:20 +0200
          Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 19:20 +0200
        Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 18:10 +0200
          Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 18:20 +0200
            Re: How to change default umask in Stretch? "Garrett R." <grtrbsn83@unseen.is> - 2017-08-07 18:40 +0200
              Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 19:00 +0200
                Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 19:10 +0200
                Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 19:10 +0200
                Re: How to change default umask in Stretch? Dejan Jocic <jodejka@gmail.com> - 2017-08-07 19:10 +0200
                Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 19:10 +0200
      Re: How to change default umask in Stretch? Felix Miata <mrmazda@earthlink.net> - 2017-08-07 19:00 +0200
        Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 19:20 +0200
  Re: How to change default umask in Stretch? Greg Wooledge <wooledg@eeg.ccf.org> - 2017-08-07 14:40 +0200

csiph-web