supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re: A better method than daisy-chaining logging files?
Date: Mon, 17 Jun 2019 17:58:39 +0000	[thread overview]
Message-ID: <em673139b5-4f09-4e29-8ff2-68a29299ea0b@elzian> (raw)
In-Reply-To: <8447f17e-0960-196d-bdf5-64a3d203cff0@heuristicsystems.com.au>

># s6-svc -a /run/scan/apache24-error-log
>
>The result is a directory containing
>-rw-r--r--  1 mylogger  www     0B Jun 17 15:34 state
>-rw-r--r--  1 mylogger  www     0B Jun 17 15:34 lock
>-rwxr--r--  1 mylogger  www   329B Jun 17 15:34 previous
>-rw-r--r--  1 mylogger  www     0B Jun 17 15:34 current
>
>and an error message
>s6-log: warning: unable to finish previous .s to logdir
>/var/log/httpd/error: Operation not permitted
>
>I've su'ed into the /var/log/httpd/error as "logger" and I'm able to
>create and compress files within the directory; so there are no
>permission issues.  And both execlineb and s6-log are installed with 766
>privs.

You mean "mylogger", I assume? Does the mylogger user belong
to the www group?
What are the permissions on the /var/log/httpd/error directory
itself?
Can you send a strace, or a kdump/ktrace, of the s6-log process
when the error occurs? One of the system calls performed during a
rotation is failing with EPERM and knowing which one will help us
pinpoint exactly what's going wrong.


>Does s6-log require root:wheel privs to perform functions within the log
>directory?

No, if the logdir belongs to the user s6-log is running as, and has
at least S_IRWXU permissions, then s6-log is good to go. Something else
is going on here, and knowing what syscall is failing will tell us
where to look.

--
Laurent



  reply	other threads:[~2019-06-17 17:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31  5:24 Dewayne Geraghty
2019-05-31  9:22 ` Laurent Bercot
2019-05-31 12:52   ` Brett Neumeier
2019-06-17  6:25     ` Dewayne Geraghty
2019-06-17 17:58       ` Laurent Bercot [this message]
2019-06-17 22:15         ` Dewayne Geraghty
2019-06-18  6:35           ` Laurent Bercot
2019-06-18  7:27             ` Dewayne Geraghty
2019-06-18  7:26         ` Joan Picanyol i Puig
2019-06-18  7:48           ` Dewayne Geraghty
2019-06-18 20:52             ` Joan Picanyol i Puig
2019-06-19  7:05               ` Dewayne Geraghty
2019-06-20  6:09                 ` Laurent Bercot
2019-06-18  7:53           ` Dewayne Geraghty

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=em673139b5-4f09-4e29-8ff2-68a29299ea0b@elzian \
    --to=ska-supervision@skarnet.org \
    --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).