• xinetd log owner

    From fxkl47BF@3:633/10 to All on Sunday, February 01, 2026 18:20:01
    i my xinetd service config, my_service, i have

    user = bbob
    log_type = FILE /tmp/my_service.log

    xinetd creates a new empty file owned by root
    so application being run as bbob can't write to log file
    xinetd launches the application as it should and it runs ok
    just no logging
    i'm missing something obvious

    --- PyGate Linux v1.5.10
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From Greg Wooledge@3:633/10 to All on Sunday, February 01, 2026 19:00:01
    On Sun, Feb 01, 2026 at 17:15:03 +0000, fxkl47BF@protonmail.com wrote:
    i my xinetd service config, my_service, i have

    user = bbob
    log_type = FILE /tmp/my_service.log

    xinetd creates a new empty file owned by root
    so application being run as bbob can't write to log file

    I looked at the xinetd.conf man page online, and it doesn't give
    any options for owner/group/permissions of the log file. It just says
    it'll be created if it doesn't exist.

    I believe the understanding is that you'll create the file yourself,
    and give it the right owner/group/permissions, since that's a one-time operation. Therefore, it doesn't need to be configurable within
    the xinetd.conf, because nobody ever uses that feature.

    In your case, I would recommend moving the log file out of /tmp and
    into a permanent location, and creating it in advance with the proper
    owner, group and permissions. That's the sensible way.

    If you insist on being not sensible, then perhaps you could configure
    your system to create this file in /tmp every time you boot, either
    using systemd-tmpfiles(8) or an /etc/rc.local script or something
    along those lines. This would not be my choice. A log file shouldn't
    be in /tmp.

    --- PyGate Linux v1.5.10
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From tomas@3:633/10 to All on Sunday, February 01, 2026 19:00:01
    On Sun, Feb 01, 2026 at 05:15:03PM +0000, fxkl47BF@protonmail.com wrote:
    i my xinetd service config, my_service, i have

    user = bbob
    log_type = FILE /tmp/my_service.log

    xinetd creates a new empty file owned by root
    so application being run as bbob can't write to log file

    This is not /necessarily/ true. If xinetd starts as root, drops
    privileges when starting the application /and/ passes fd to the
    open log file to its child, the child should be able to write
    to the log file.

    xinetd launches the application as it should and it runs ok
    just no logging
    i'm missing something obvious

    Could you try to describe your setup a bit more?

    Cheers
    -
    t

    --- PyGate Linux v1.5.10
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From tomas@3:633/10 to All on Sunday, February 01, 2026 19:20:01
    On Sun, Feb 01, 2026 at 12:58:00PM -0500, Greg Wooledge wrote:

    [...]

    In your case, I would recommend moving the log file out of /tmp and
    into a permanent location, and creating it in advance with the proper
    owner, group and permissions. That's the sensible way.

    If you insist on being not sensible, then perhaps you could configure
    your system to create this file in /tmp every time you boot, either
    using systemd-tmpfiles(8) or an /etc/rc.local script or something
    along those lines. This would not be my choice. A log file shouldn't
    be in /tmp.

    Regardless of whether my hunch in the other post is right or not, I
    agree wholeheartedly on this. /tmp is OK for playing around and trying
    to get things running, but not for production. Being unable to debug
    a problem is just a boot away :)

    A good place for the log file is, of course, /var/log. Proper log
    rotation is provided by logrotate.

    Cheers
    --
    tom s

    --- PyGate Linux v1.5.10
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
  • From fxkl47BF@3:633/10 to All on Sunday, February 01, 2026 19:20:01
    On Sun, 1 Feb 2026, Greg Wooledge wrote:

    On Sun, Feb 01, 2026 at 17:15:03 +0000, fxkl47BF@protonmail.com wrote:
    i my xinetd service config, my_service, i have

    user = bbob
    log_type = FILE /tmp/my_service.log

    xinetd creates a new empty file owned by root
    so application being run as bbob can't write to log file

    I looked at the xinetd.conf man page online, and it doesn't give
    any options for owner/group/permissions of the log file. It just says
    it'll be created if it doesn't exist.

    I believe the understanding is that you'll create the file yourself,
    and give it the right owner/group/permissions, since that's a one-time operation. Therefore, it doesn't need to be configurable within
    the xinetd.conf, because nobody ever uses that feature.

    In your case, I would recommend moving the log file out of /tmp and
    into a permanent location, and creating it in advance with the proper
    owner, group and permissions. That's the sensible way.

    i've been called a lot of things but never sensible
    i think i'll give this a try


    If you insist on being not sensible, then perhaps you could configure
    your system to create this file in /tmp every time you boot, either
    using systemd-tmpfiles(8) or an /etc/rc.local script or something
    along those lines. This would not be my choice. A log file shouldn't
    be in /tmp.


    --- PyGate Linux v1.5.10
    * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)