supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Dewayne Geraghty <dewayne.geraghty@heuristicsystems.com.au>
To: supervision@list.skarnet.org
Subject: Re: s6-log can create current with 640?
Date: Thu, 24 Oct 2019 10:03:58 +1100	[thread overview]
Message-ID: <01b8c564-887f-16cf-405c-8bcfc52c02b1@heuristicsystems.com.au> (raw)
In-Reply-To: <c4d5da6e-32cb-7ae5-bead-10558e517963@NTLWorld.COM>

Thanks Jonathon.  Both attempts were within the execlineb context, so I
assume that umask was correctly employed ;).  I tried

My initial attempt

#!/usr/local/bin/execlineb -P
s6-setuidgid uucp
redirfd -r 0 /services/ntp/fifo
umask 037
/usr/local/bin/s6-log -b n14 r7000 s100000 S3000000 !"/usr/bin/xz -7q"
/var/log/ntpd

which results in notice of "# echo: write: Broken pipe"; the ntp process
properly starts but there is no ntp logging process.

---
The usual flow is
echo: write: Broken pipe
...

and in quick succession (<1 sec):

# ps -axww | grep ntpd
28869  -  Rs         0:00.00 s6-setuidgid uucp redirfd -r 0
/service/fifo umask 037 /usr/local/bin/s6-log -b n14 r7000 s100000
S3000000 !/usr/bin/xz -7q /var/log/ntpd

# ps -axww | grep ntpd
29457  -  Ss         0:00.03 /usr/local/sbin/ntpd -c /etc/ntp.conf -u
ntpd -x -G --nofork

and /var/log/ntpd folder is empty (with mode rwx------)
---

If I move umask up one line (before redirfd), the logging process
doesn't start; and blocks the start of ntp.  There is a dependency
relationship ntp-log <- ntp  so this is expected.

I was surprised that umask didn't work, but not overly concerned; as
Colin, quite rightly, pointed to my directory permissions as being
adequate.  Now to migrate sendmail and its milters...

Regards, Dewayne


  reply	other threads:[~2019-10-23 23:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-23  2:27 Dewayne Geraghty
2019-10-23  4:53 ` Colin Booth
2019-10-23  5:39   ` Dewayne Geraghty
2019-10-23  7:15 ` Jonathan de Boyne Pollard
2019-10-23 23:03   ` Dewayne Geraghty [this message]
2019-10-23 23:58     ` Laurent Bercot
2019-10-25  8:20       ` Dewayne Geraghty
2019-10-25 17:06         ` Guillermo
2019-10-26  1:52           ` Dewayne Geraghty
2019-10-26  5:27             ` Laurent Bercot
2019-10-26  7:16               ` Dewayne Geraghty
2019-10-26 13:08                 ` Laurent Bercot
2019-10-29  7:28               ` Jonathan de Boyne Pollard
     [not found]               ` <a8fbd02e-0265-3d59-89d1-81048665693c@ntlworld.com>
2019-10-29  8:53                 ` Laurent Bercot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01b8c564-887f-16cf-405c-8bcfc52c02b1@heuristicsystems.com.au \
    --to=dewayne.geraghty@heuristicsystems.com.au \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).