Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #184773 > unrolled thread
| Started by | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| First post | 2017-08-06 23:00 +0200 |
| Last post | 2017-08-07 14:40 +0200 |
| Articles | 20 on this page of 34 — 9 participants |
Back to article view | Back to linux.debian.user
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
Page 1 of 2 [1] 2 Next page →
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-06 23:00 +0200 |
| Subject | How to change default umask in Stretch? |
| Message-ID | <ubAOu-72y-21@gated-at.bofh.it> |
The "old" methods for changing the default umask no longer work in Debian Stretch. It appears systemd now manages umask. Can someone please describe how I can change the default umask setting in Stretch?
[toc] | [next] | [standalone]
| From | Dennis Creedan <wingman619@gmail.com> |
|---|---|
| Date | 2017-08-07 06:20 +0200 |
| Message-ID | <ubHGh-3lW-3@gated-at.bofh.it> |
| In reply to | #184773 |
I think the default umask is defined in /etc/profile. On Sun, Aug 6, 2017 at 2:50 PM, Garrett R. <grtrbsn83@unseen.is> wrote: > The "old" methods for changing the default umask no longer work in Debian Stretch. > > It appears systemd now manages umask. Can someone please describe how I can change the default umask setting in Stretch? >
[toc] | [prev] | [next] | [standalone]
| From | Felix Miata <mrmazda@earthlink.net> |
|---|---|
| Date | 2017-08-07 07:00 +0200 |
| Message-ID | <ubIiZ-3Cw-5@gated-at.bofh.it> |
| In reply to | #184773 |
Garrett R. composed on 2017-08-06 20:50 (UTC): > The "old" methods for changing the default umask no longer work in Debian > Stretch. > It appears systemd now manages umask. Can someone please describe how I can > change the default umask setting in Stretch? Is your question based on the documentation contained within /etc/profile and /etc/login.defs? I don't think "systemd" changed anything, while pam may have. I still reconfigure globally using /etc/profile.local. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 17:30 +0200 |
| Message-ID | <ubS8G-1Uh-13@gated-at.bofh.it> |
| In reply to | #184784 |
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. Please advise on where "/etc/profile.local" is. I can find no such entry. > Is your question based on the documentation contained within /etc/profile and /etc/login.defs? I don't think "systemd" changed anything, while pam may have. I still reconfigure globally using /etc/profile.local. ----- Original Message ----- From: "Felix Miata" <mrmazda@earthlink.net> To: debian-user@lists.debian.org Sent: Monday, August 7, 2017 12:50:35 AM Subject: Re: How to change default umask in Stretch? Garrett R. composed on 2017-08-06 20:50 (UTC): > The "old" methods for changing the default umask no longer work in Debian > Stretch. > It appears systemd now manages umask. Can someone please describe how I can > change the default umask setting in Stretch? Is your question based on the documentation contained within /etc/profile and /etc/login.defs? I don't think "systemd" changed anything, while pam may have. I still reconfigure globally using /etc/profile.local. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2017-08-07 17:40 +0200 |
| Message-ID | <ubSim-1Ys-23@gated-at.bofh.it> |
| In reply to | #184815 |
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.
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 17:50 +0200 |
| Message-ID | <ubSs1-22w-13@gated-at.bofh.it> |
| In reply to | #184817 |
I apologize for the omissions. I am booting debian to GDM. I login. I then open gedit (or libreoffice, etc). I type document. I save it. ----- 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.
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 19:20 +0200 |
| Message-ID | <ubTR8-3eW-17@gated-at.bofh.it> |
| In reply to | #184819 |
I just tried this, adding "session optional pam_umask.so umask=0077" to the end of the /etc/pam.d/login file. No effect. ----- Original Message ----- From: "Dejan Jocic" <jodejka@gmail.com> To: debian-user@lists.debian.org Sent: Monday, August 7, 2017 1:11:02 PM Subject: Re: How to change default umask in Stretch? On 07-08-17, Garrett R. wrote: > I apologize for the omissions. > > I am booting debian to GDM. I login. I then open gedit (or libreoffice, etc). I type document. I save it. > Have you tried to set in /etc/pam.d/login this: session optional pam_umask.so umask=0077 Logout and login back after that?
[toc] | [prev] | [next] | [standalone]
| From | Dejan Jocic <jodejka@gmail.com> |
|---|---|
| Date | 2017-08-07 20:10 +0200 |
| Message-ID | <ubUDw-3Ol-23@gated-at.bofh.it> |
| In reply to | #184837 |
On 07-08-17, Garrett R. wrote: > I just tried this, adding "session optional pam_umask.so umask=0077" to the end of the /etc/pam.d/login file. > > No effect. > > ----- Original Message ----- > From: "Dejan Jocic" <jodejka@gmail.com> > To: debian-user@lists.debian.org > Sent: Monday, August 7, 2017 1:11:02 PM > Subject: Re: How to change default umask in Stretch? > > On 07-08-17, Garrett R. wrote: > > I apologize for the omissions. > > > > I am booting debian to GDM. I login. I then open gedit (or libreoffice, etc). I type document. I save it. > > > > > Have you tried to set in /etc/pam.d/login this: > > session optional pam_umask.so umask=0077 > > Logout and login back after that? > Now try to add it too to the /etc/pam.d/common-session and to set it up in /etc/login.defs to your preferred value. Of course, logout/login after all that.
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 20:10 +0200 |
| Message-ID | <ubUDw-3Ol-27@gated-at.bofh.it> |
| In reply to | #184841 |
No effect. I added "session optional pam_umask.so umask=0077" to the end of /etc/pam.d/common-session. Then I confirmed /etc/login.defs has a umask entry. Then I logged out and back in. A new gedit document still reports permission rw-r--r--. ----- Original Message ----- From: "Dejan Jocic" <jodejka@gmail.com> To: debian-user@lists.debian.org Sent: Monday, August 7, 2017 2:00:37 PM Subject: Re: How to change default umask in Stretch? On 07-08-17, Garrett R. wrote: > I just tried this, adding "session optional pam_umask.so umask=0077" to the end of the /etc/pam.d/login file. > > No effect. > > ----- Original Message ----- > From: "Dejan Jocic" <jodejka@gmail.com> > To: debian-user@lists.debian.org > Sent: Monday, August 7, 2017 1:11:02 PM > Subject: Re: How to change default umask in Stretch? > > On 07-08-17, Garrett R. wrote: > > I apologize for the omissions. > > > > I am booting debian to GDM. I login. I then open gedit (or libreoffice, etc). I type document. I save it. > > > > > Have you tried to set in /etc/pam.d/login this: > > session optional pam_umask.so umask=0077 > > Logout and login back after that? > Now try to add it too to the /etc/pam.d/common-session and to set it up in /etc/login.defs to your preferred value. Of course, logout/login after all that.
[toc] | [prev] | [next] | [standalone]
| From | Dejan Jocic <jodejka@gmail.com> |
|---|---|
| Date | 2017-08-07 20:40 +0200 |
| Message-ID | <ubV6y-416-15@gated-at.bofh.it> |
| In reply to | #184842 |
On 07-08-17, Garrett R. wrote: > No effect. > > I added "session optional pam_umask.so umask=0077" to the end of /etc/pam.d/common-session. Then I confirmed /etc/login.defs has a umask entry. Then I logged out and back in. > > A new gedit document still reports permission rw-r--r--. > Unfortunately. It looks like it is systemd thing indeed, according to this: https://unix.stackexchange.com/questions/254378/how-to-set-umask-for-the-entire-gnome-session#254923 and this https://github.com/systemd/systemd/issues/6077 It also looks like it does not have workaround. Except to touch file from terminal before editing it in gedit( if it is login shell, for gnome-terminal edit > profile preferences > command > run command as login shell ). Or even better launch gedit from that terminal, it will have right umask settings. Or, make custom shortcut that will launch terminal and gedit from it at same time, something like gnome-terminal -e gedit. Sorry, but not much more help with systemd involved, I'm afraid.
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 21:10 +0200 |
| Message-ID | <ubVzB-4s8-37@gated-at.bofh.it> |
| In reply to | #184844 |
So if I want to use Gnome, I'm stuck on Jessie until this Pottering guy and Gnome get off their asses and fix this mess? This is a long established linux item missing complete functionality. There should be a lot more priority in fixing it than Pottering and Gnome are giving it. ----- Original Message ----- From: "Dejan Jocic" <jodejka@gmail.com> To: "Garrett R." <grtrbsn83@unseen.is> Cc: debian-user@lists.debian.org Sent: Monday, August 7, 2017 2:32:30 PM Subject: Re: How to change default umask in Stretch? On 07-08-17, Garrett R. wrote: > No effect. > > I added "session optional pam_umask.so umask=0077" to the end of /etc/pam.d/common-session. Then I confirmed /etc/login.defs has a umask entry. Then I logged out and back in. > > A new gedit document still reports permission rw-r--r--. > Unfortunately. It looks like it is systemd thing indeed, according to this: https://unix.stackexchange.com/questions/254378/how-to-set-umask-for-the-entire-gnome-session#254923 and this https://github.com/systemd/systemd/issues/6077 It also looks like it does not have workaround. Except to touch file from terminal before editing it in gedit( if it is login shell, for gnome-terminal edit > profile preferences > command > run command as login shell ). Or even better launch gedit from that terminal, it will have right umask settings. Or, make custom shortcut that will launch terminal and gedit from it at same time, something like gnome-terminal -e gedit. Sorry, but not much more help with systemd involved, I'm afraid.
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-07 22:10 +0200 |
| Message-ID | <ubWvF-56O-39@gated-at.bofh.it> |
| In reply to | #184844 |
Does anybody know, this gnome/systemd bug of umask, it this something that I will have to wait for Debian 10 before it is fixed? Or will Debian 9 implement a fix when/if gnome/systemd issues a fix? I was hoping to be able to move to Stretch, but it's looking unlikely now. ----- Original Message ----- From: "Dejan Jocic" <jodejka@gmail.com> To: "Garrett R." <grtrbsn83@unseen.is> Cc: debian-user@lists.debian.org Sent: Monday, August 7, 2017 2:32:30 PM Subject: Re: How to change default umask in Stretch? On 07-08-17, Garrett R. wrote: > No effect. > > I added "session optional pam_umask.so umask=0077" to the end of /etc/pam.d/common-session. Then I confirmed /etc/login.defs has a umask entry. Then I logged out and back in. > > A new gedit document still reports permission rw-r--r--. > Unfortunately. It looks like it is systemd thing indeed, according to this: https://unix.stackexchange.com/questions/254378/how-to-set-umask-for-the-entire-gnome-session#254923 and this https://github.com/systemd/systemd/issues/6077 It also looks like it does not have workaround. Except to touch file from terminal before editing it in gedit( if it is login shell, for gnome-terminal edit > profile preferences > command > run command as login shell ). Or even better launch gedit from that terminal, it will have right umask settings. Or, make custom shortcut that will launch terminal and gedit from it at same time, something like gnome-terminal -e gedit. Sorry, but not much more help with systemd involved, I'm afraid.
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2017-08-07 22:50 +0200 |
| Message-ID | <ubX8n-5vB-29@gated-at.bofh.it> |
| In reply to | #184848 |
On Mon 07 Aug 2017 at 20:00:10 (+0000), Garrett R. wrote: > Does anybody know, this gnome/systemd bug of umask, it this something that I will have to wait for Debian 10 before it is fixed? Or will Debian 9 implement a fix when/if gnome/systemd issues a fix? > > I was hoping to be able to move to Stretch, but it's looking unlikely now. My suggestion is simple, but would be tedious to implement. I use it to run a program as a different user, overriding their default umask. /home/other/bin/my-program.sh contains #!/bin/bash umask u=rwx,go= /usr/bin/real-program "$@" But it's tedious to have to replace real-program by /home/other/bin/my-program.sh in all the places it/they might get called from. I only have to do this once (in .bashrc) because I'm a bash/xterm/fvwm guy using bash functions. Cheers, David.
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@gmail.com> |
|---|---|
| Date | 2017-08-08 12:30 +0200 |
| Message-ID | <uc9VT-6Xw-1@gated-at.bofh.it> |
| In reply to | #184853 |
Hi. On Mon, Aug 07, 2017 at 03:47:48PM -0500, David Wright wrote: > On Mon 07 Aug 2017 at 20:00:10 (+0000), Garrett R. wrote: > > Does anybody know, this gnome/systemd bug of umask, it this something that I will have to wait for Debian 10 before it is fixed? Or will Debian 9 implement a fix when/if gnome/systemd issues a fix? > > > > I was hoping to be able to move to Stretch, but it's looking unlikely now. > > My suggestion is simple, but would be tedious to implement. I use it > to run a program as a different user, overriding their default umask. > > /home/other/bin/my-program.sh contains > > #!/bin/bash > umask u=rwx,go= > /usr/bin/real-program "$@" > > But it's tedious to have to replace real-program by /home/other/bin/my-program.sh > in all the places it/they might get called from. I only have to do > this once (in .bashrc) because I'm a bash/xterm/fvwm guy using > bash functions. Or find gnome-session (or gnome-shell - I don't recall who exactly spawns user applications in GNOME) process pid, execute something like this on login: gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch You'll need gdb to be installed, of course. Reco
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <wooledg@eeg.ccf.org> |
|---|---|
| Date | 2017-08-09 14:10 +0200 |
| Message-ID | <ucxYe-6SW-1@gated-at.bofh.it> |
| In reply to | #184883 |
On Tue, Aug 08, 2017 at 01:27:02PM +0300, Reco wrote: > Or find gnome-session (or gnome-shell - I don't recall who exactly > spawns user applications in GNOME) process pid, execute something like > this on login: > > gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch > > You'll need gdb to be installed, of course. It's beginning to sound like GNOME applications aren't even launched by GNOME at all, but rather by systemd/dbus. Somehow. I'd be interested in hearing the results of your gdb experiment being performed on the user session dbus daemon process, by someone using GNOME. I have no idea whether it would actually work, but if it does, that would help us understand how this... desktop... is put together.
[toc] | [prev] | [next] | [standalone]
| From | Reco <recoverym4n@gmail.com> |
|---|---|
| Date | 2017-08-10 07:20 +0200 |
| Message-ID | <ucO2Z-16P-3@gated-at.bofh.it> |
| In reply to | #184928 |
Hi. An update for the archives. On Wed, 9 Aug 2017 08:09:16 -0400 Greg Wooledge <wooledg@eeg.ccf.org> wrote: > On Tue, Aug 08, 2017 at 01:27:02PM +0300, Reco wrote: > > Or find gnome-session (or gnome-shell - I don't recall who exactly > > spawns user applications in GNOME) process pid, execute something like > > this on login: > > > > gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch > > > > You'll need gdb to be installed, of course. > > It's beginning to sound like GNOME applications aren't even launched > by GNOME at all, but rather by systemd/dbus. Somehow. Couple of experiments later, which involved strace, ltrace *and* auditctl I confirm that GNOME applications are launched by dbus-daemon indeed. Not 'system' one, but 'session' dbus-daemon. If you do it via gnome-shell anyway. > I'd be interested in hearing the results of your gdb experiment being > performed on the user session dbus daemon process, by someone using > GNOME. I have no idea whether it would actually work, but if it does, > that would help us understand how this... desktop... is put together. So, once I pinpointed spawning process, I poked it with gdb and it changed the umask. So, correct hack for the umask in GNOME (as of stretch) is: gdb -p $(pgrep -U $(id -u) -f '/usr/bin/dbus-daemon --fork') \ -ex 'p umask(0077)' --batch Reco
[toc] | [prev] | [next] | [standalone]
| From | Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> |
|---|---|
| Date | 2017-08-12 10:20 +0200 |
| Message-ID | <udzOh-6xO-3@gated-at.bofh.it> |
| In reply to | #184928 |
Greg Wooledge: > > It's beginning to sound like GNOME applications aren't even launched > by GNOME at all, but rather by systemd/dbus. Somehow. > GNOME Editor and other GIO applications work like how 16-bit Windows applications used to work. GNOME Terminal goes yet farther and not even the first instance is the originally invoked process. All instances, even the first, are "bus-activated". Depending from whether there is a per-user instance of systemd or not, there may be a further level of indirection. Of course, in the case where "bus activation" is configured to at least pass things over to some proper per-user service management, the place to set the ulimit for the likes of GNOME Terminal is in the per-user service definition for GNOME Terminal server. With the nosh per-user service mangement, this would be the $HOME/.config/service-bundles/services/gnome-terminal-server/service/run program. With systemd per-user service management this would be a $HOME/.config/systemd/gnome-terminal-server.service.d/ulimit.conf override for /usr/lib/systemd/user/gnome-terminal-server.service . With nosh per-user service management, there is a $HOME/.config/service-bundles/services/gedit service, which one can start before attempting to run the first GNOME Editor instance; which would permit one to place ulimit and suchlike modifications in $HOME/.config/service-bundles/services/gedit/service/run . Vanilla GNOME Editor does not attempt to plumb into systemd's per-user service management, as GNOME Terminal does; so there is no systemd equivalent here. * https://news.ycombinator.com/item?id=13056252 * https://unix.stackexchange.com/a/323700/5132 * https://unix.stackexchange.com/questions/201900/ * http://jdebp.info./Softwares/nosh/avoid-dbus-bus-activation.html#InheritedLimits * http://jdebp.info./Softwares/nosh/guide/per-user-dbus-demand-start.html
[toc] | [prev] | [next] | [standalone]
| From | "Garrett R." <grtrbsn83@unseen.is> |
|---|---|
| Date | 2017-08-09 14:40 +0200 |
| Message-ID | <ucyrg-733-21@gated-at.bofh.it> |
| In reply to | #184883 |
Found this. Reuben Thomas reported this earlier in the year. Lot of guys tracked down PIDs. https://bugzilla.gnome.org/show_bug.cgi?id=780622 ----- Original Message ----- From: "Reco" <recoverym4n@gmail.com> To: debian-user@lists.debian.org Sent: Tuesday, August 8, 2017 6:27:02 AM Subject: Re: How to change default umask in Stretch? Or find gnome-session (or gnome-shell - I don't recall who exactly spawns user applications in GNOME) process pid, execute something like this on login: gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch On Mon, Aug 07, 2017 at 03:47:48PM -0500, David Wright wrote: > On Mon 07 Aug 2017 at 20:00:10 (+0000), Garrett R. wrote: > > Does anybody know, this gnome/systemd bug of umask, it this something that I will have to wait for Debian 10 before it is fixed? Or will Debian 9 implement a fix when/if gnome/systemd issues a fix? > > > > I was hoping to be able to move to Stretch, but it's looking unlikely now. > > My suggestion is simple, but would be tedious to implement. I use it > to run a program as a different user, overriding their default umask. > > /home/other/bin/my-program.sh contains > > #!/bin/bash > umask u=rwx,go= > /usr/bin/real-program "$@" > > But it's tedious to have to replace real-program by /home/other/bin/my-program.sh > in all the places it/they might get called from. I only have to do > this once (in .bashrc) because I'm a bash/xterm/fvwm guy using > bash functions. Or find gnome-session (or gnome-shell - I don't recall who exactly spawns user applications in GNOME) process pid, execute something like this on login: gdb -p $(pidof gnome-session) -ex 'p umask(0077)' --batch You'll need gdb to be installed, of course. Reco
[toc] | [prev] | [next] | [standalone]
| From | Henrique de Moraes Holschuh <hmh@debian.org> |
|---|---|
| Date | 2017-08-07 23:20 +0200 |
| Message-ID | <ubXBn-5Yw-15@gated-at.bofh.it> |
| In reply to | #184848 |
On Mon, 07 Aug 2017, Garrett R. wrote: > Does anybody know, this gnome/systemd bug of umask, it this something > that I will have to wait for Debian 10 before it is fixed? Or will > Debian 9 implement a fix when/if gnome/systemd issues a fix? It is too early to tell. It depends on how complex the systemd changes would be. Suppose they're "simple enough". One could then backport these changes to stretch's systemd, *test them throughoutly* -- and by that I do mean do a very, very good job of that *and* also of reporting it -- and then propose that the changes be accepted into a stretch point release. So, yes, it could happen, but someone has to do the work. I suggest writing the patch for systemd upstream and trying to get it (or some other solution) merged as the first step. Note that the ideal implementation would be to inherit the umask from whatever was set by pam or by the user's login shell as one of the possibilities (and have that as the default, actually). However, I am not sure this is straightforward: it depends on how "systemd --user" launching of user-session services works... -- Henrique Holschuh
[toc] | [prev] | [next] | [standalone]
| From | Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> |
|---|---|
| Date | 2017-08-12 11:10 +0200 |
| Message-ID | <udAAF-78r-5@gated-at.bofh.it> |
| In reply to | #184854 |
Henrique de Moraes Holschuh: > Note that the ideal implementation would be to inherit the umask [...] > Actually, the ideal implementation from the GNOME point of view would be for these programs to pass the umask from the client process to the server, just like they pass open file handles, the working directory, environment variables (including DISPLAY), and the arguments vector. * https://github.com/GNOME/gnome-terminal/blob/52f32f962a5ed34f8c31042f2f8276dc1710cc99/src/terminal.c#L317 * https://github.com/GNOME/glib/blob/b51a0e7c63313ecfc0c6bbb9f2a8d99f193e51ea/gio/gapplication.c#L923
[toc] | [prev] | [next] | [standalone]
Page 1 of 2 [1] 2 Next page →
Back to top | Article view | linux.debian.user
csiph-web