• Webmin environment

    From Grimble@2:250/1 to All on Wednesday, May 08, 2024 11:51:45
    Can someone explain the following please?
    In order for Webmin to run, it needs /var/run/webmin, as the following
    extract from webmin.service shows:
    [Service]
    Environment="PERLLIB=/usr/libexec/webmin" ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf ExecStop=/bin/kill $MAINPID
    ExecReload=/bin/kill -HUP $MAINPID
    PIDFile=/var/run/webmin/miniserv.pid
    Type=forking
    Restart=always
    RestartSec=2s
    TimeoutSec=15s
    TimeoutStopSec=300s

    So I create it, and all is good. However, it does not survive over
    (re)boot, and I can't see why it should be deleted on shutdown, so I
    have to re-create it on startup.
    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.27.10 on 6.6.28-desktop-1.mga9 kernel.
    Mageia release 9 (Official) for x86_64

    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Vincent Coen@2:250/1 to Grimble on Wednesday, May 08, 2024 16:33:16
    Hello Grimble!

    Wednesday May 08 2024 11:51, Grimble wrote to All:


    Does the folder content look similr to this ? :

    [vince@applewood ~]$ sudo ls -la /var/run/webmin/
    total 68
    drwx------ 3 root bin 200 Apr 29 00:05 .
    drwxr-xr-x 44 root root 1240 May 8 16:01 ..
    -rwx------ 1 root root 0 Apr 29 01:00 blocked
    -rw-r--r-- 1 root root 315 Apr 29 01:00 miniserv.error
    -rw-r--r-- 1 root root 54 May 8 16:06 miniserv.lastcrons
    -rw-r--r-- 1 root root 5 Apr 29 01:00 miniserv.pid
    -rw-r--r-- 1 root root 50500 Apr 29 00:05 module.infos.cache
    drwx------ 30 root root 600 Apr 30 00:00 modules
    -rwx------ 1 root root 0 Apr 29 01:00 sessiondb.dir
    -rwx------ 1 root root 1024 Apr 29 01:00 sessiondb.pag


    Note that all is owned by root

    As for /usr/lib/systemd/system/webmin.service

    [Unit]
    Description=Webmin server daemon

    [Service]
    Environment="PERLLIB=/usr/share/webmin"
    ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf ExecStop=/bin/kill $MAINPID
    ExecReload=/bin/kill -HUP $MAINPID
    PIDFile=/run/webmin/miniserv.pid
    Type=forking
    Restart=always
    RestartSec=2s
    TimeoutSec=15s

    [Install]
    WantedBy=multi-user.target

    webmin service is active

    and a check on the service :

    udo systemctl status webmin.service
    ● webmin.service - Webmin server daemon
    Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled;
    preset: d>
    Active: active (running) since Mon 2024-04-29 01:00:06 BST; 1 week 2
    days >
    Process: 919 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.c>
    Main PID: 2991 (miniserv.pl)
    Tasks: 1 (limit: 19053)
    Memory: 87.5M
    CPU: 1min 25.866s
    CGroup: /system.slice/webmin.service
    └─2991 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/min>

    Apr 29 01:00:03 applewood.server systemd[1]: Starting webmin.service...
    Apr 29 01:00:06 applewood.server systemd[1]: Started webmin.service. [vince@applewood ~]$ sudo systemctl status webmin.service
    ● webmin.service - Webmin server daemon
    Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled;
    preset: disabled)
    Active: active (running) since Mon 2024-04-29 01:00:06 BST; 1 week 2
    days ago
    Process: 919 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf (code=exited, status=0/SUC>
    Main PID: 2991 (miniserv.pl)
    Tasks: 1 (limit: 19053)
    Memory: 87.5M
    CPU: 1min 25.869s
    CGroup: /system.slice/webmin.service
    └─2991 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf

    Apr 29 01:00:03 applewood.server systemd[1]: Starting webmin.service...
    Apr 29 01:00:06 applewood.server systemd[1]: Started webmin.service.


    Hope the above helps in some way.

    Vincent


    Can someone explain the following please?
    In order for Webmin to run, it needs /var/run/webmin, as the following
    extract from webmin.service
    shows: [Service] Environment="PERLLIB=/usr/libexec/webmin" ExecStart=/ usr/libexec/webmin/miniserv.pl
    /etc/webmin/miniserv.conf ExecStop=/bin/kill
    $MAINPID ExecReload=/bin/kill -HUP
    $MAINPID PIDFile=/var/run/webmin/miniserv.pid Type=forking Restart=alw
    ays RestartSec=2s TimeoutSec=15s TimeoutStopSec=300s

    So I create it, and all is good. However, it does not survive over
    (re)boot, and I can't see why it should be deleted on shutdown, so I
    have to re-create it on startup.
    --
    Grimble
    Registered Linux User #450547
    Machine 'Bach' running Plasma 5.27.10 on 6.6.28-desktop-1.mga9 kernel. Mageia release 9 (Official) for x86_64



    Vincent


    SEEN-BY: 25/0 21 250/0 1 2 3 4 5 6 8 13 14 15 263/0 362/6 467/4 712/1321
  • From David W. Hodgins@2:250/1 to All on Wednesday, May 08, 2024 15:02:57
    On Wed, 08 May 2024 06:51:45 -0400, Grimble <grimble@nomail.afraid.org> wrote:

    Can someone explain the following please?
    In order for Webmin to run, it needs /var/run/webmin, as the following extract from webmin.service shows:
    [Service]
    Environment="PERLLIB=/usr/libexec/webmin" ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf ExecStop=/bin/kill $MAINPID
    ExecReload=/bin/kill -HUP $MAINPID
    PIDFile=/var/run/webmin/miniserv.pid
    Type=forking
    Restart=always
    RestartSec=2s
    TimeoutSec=15s
    TimeoutStopSec=300s

    So I create it, and all is good. However, it does not survive over
    (re)boot, and I can't see why it should be deleted on shutdown, so I
    have to re-create it on startup.

    # file /var/run
    /var/run: symbolic link to ../run

    The /run directory is the mount point for a tmpfs file system created in ram only. It is not supposed to survive a reboot.
    # mount|grep 'run '
    tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)

    The directories and some files are created at boot as specified in conf files in /usr/lib/tmpfiles.d/ or /etc/tmpfiles.d/

    In Mageia 9 ...
    # cat /usr/lib/tmpfiles.d/webmin.conf
    d /run/webmin 0700 root bin -

    After installing webmin and rebooting ...
    # systemctl status webmin.service
    ○ webmin.service - Webmin server daemon
    Loaded: loaded (/usr/lib/systemd/system/webmin.service; disabled; preset: disabled)
    Active: inactive (dead)

    [root@x9v ~]# systemctl enable webmin.service
    Synchronizing state of webmin.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    Executing: /usr/lib/systemd/systemd-sysv-install enable webmin
    Created symlink /etc/systemd/system/multi-user.target.wants/webmin.service → /usr/lib/systemd/system/webmin.service.
    [root@x9v ~]# systemctl start webmin.service
    [root@x9v ~]# systemctl status webmin.service
    ● webmin.service - Webmin server daemon
    Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled; preset: disabled)
    Active: active (running) since Wed 2024-05-08 09:58:05 EDT; 3s ago
    Process: 24558 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf (code=exited, status=0/SUCCESS)
    Main PID: 24561 (miniserv.pl)
    Tasks: 4 (limit: 4690)
    Memory: 189.3M
    CPU: 2.446s
    CGroup: /system.slice/webmin.service
    ├─24561 /usr/bin/perl /usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf
    ├─24562 /usr/share/webmin/webmincron/webmincron.pl
    ├─24578 sh -c "urpmq -f --list 2>/dev/null"
    └─24579 /usr/bin/perl /bin/urpmq -f --list

    May 08 09:58:02 x9v.hodgins.homeip.net systemd[1]: Starting webmin.service... May 08 09:58:03 x9v.hodgins.homeip.net perl[24558]: pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost= user=root
    May 08 09:58:05 x9v.hodgins.homeip.net webmin[24558]: Webmin starting
    May 08 09:58:05 x9v.hodgins.homeip.net systemd[1]: Started webmin.service.

    Once it's been enabled, then after a reboot it's starting ok here.

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Wednesday, May 08, 2024 16:40:39
    On 08/05/2024 15:02, David W. Hodgins wrote:
    On Wed, 08 May 2024 06:51:45 -0400, Grimble <grimble@nomail.afraid.org> wrote:

    Can someone explain the following please?
    In order for Webmin to run, it needs /var/run/webmin, as the following
    extract from webmin.service shows:
    [Service]
    Environment="PERLLIB=/usr/libexec/webmin"
    ExecStart=/usr/libexec/webmin/miniserv.pl /etc/webmin/miniserv.conf
    ExecStop=/bin/kill $MAINPID
    ExecReload=/bin/kill -HUP $MAINPID
    PIDFile=/var/run/webmin/miniserv.pid
    Type=forking
    Restart=always
    RestartSec=2s
    TimeoutSec=15s
    TimeoutStopSec=300s

    So I create it, and all is good. However, it does not survive over
    (re)boot, and I can't see why it should be deleted on shutdown, so I
    have to re-create it on startup.

    # file /var/run
    /var/run: symbolic link to ../run

    The /run directory is the mount point for a tmpfs file system created in
    ram
    only. It is not supposed to survive a reboot.
    # mount|grep 'run '
    tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,mode=755,inode64)

    The directories and some files are created at boot as specified in conf files
    in  /usr/lib/tmpfiles.d/ or /etc/tmpfiles.d/

    In Mageia 9 ...
    # cat /usr/lib/tmpfiles.d/webmin.conf
    d /run/webmin 0700 root bin -

    After installing webmin and rebooting ...
    # systemctl status webmin.service
    ○ webmin.service - Webmin server daemon
         Loaded: loaded (/usr/lib/systemd/system/webmin.service; disabled; preset: disabled)
         Active: inactive (dead)

    [root@x9v ~]# systemctl enable webmin.service
    Synchronizing state of webmin.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
    Executing: /usr/lib/systemd/systemd-sysv-install enable webmin
    Created symlink
    /etc/systemd/system/multi-user.target.wants/webmin.service → /usr/lib/systemd/system/webmin.service.
    [root@x9v ~]# systemctl start webmin.service
    [root@x9v ~]# systemctl status webmin.service
    ● webmin.service - Webmin server daemon
         Loaded: loaded (/usr/lib/systemd/system/webmin.service; enabled; preset: disabled)
         Active: active (running) since Wed 2024-05-08 09:58:05 EDT; 3s ago
        Process: 24558 ExecStart=/usr/share/webmin/miniserv.pl /etc/webmin/miniserv.conf (code=exited, status=0/SUCCESS)
       Main PID: 24561 (miniserv.pl)
          Tasks: 4 (limit: 4690)
         Memory: 189.3M
            CPU: 2.446s
         CGroup: /system.slice/webmin.service
                 ├─24561 /usr/bin/perl /usr/share/webmin/miniserv.pl
    /etc/webmin/miniserv.conf
                 ├─24562 /usr/share/webmin/webmincron/webmincron.pl
                 ├─24578 sh -c "urpmq -f --list 2>/dev/null"
                 └─24579 /usr/bin/perl /bin/urpmq -f --list

    May 08 09:58:02 x9v.hodgins.homeip.net systemd[1]: Starting webmin.service...
    May 08 09:58:03 x9v.hodgins.homeip.net perl[24558]:
    pam_unix(webmin:auth): authentication failure; logname= uid=0 euid=0
    tty= ruser= rhost=  user=root
    May 08 09:58:05 x9v.hodgins.homeip.net webmin[24558]: Webmin starting
    May 08 09:58:05 x9v.hodgins.homeip.net systemd[1]: Started webmin.service.

    Once it's been enabled, then after a reboot it's starting ok here.

    Regards, Dave Hodgins
    That's interesting about /run - didn't realise it's temporary nature. webmin.conf does not exist in my /usr/lib/tmpfiles.d/
    /etc/tmpfiles.d/ is empty
    I've created webmin.conf as per your cat output, and I'll check after
    the next reboot.
    Thanks.
    Graeme
    --
    Grimble
    Machine 'Haydn' running Plasma 5.27.10 on 6.6.28-desktop-1.mga9 kernel.
    Mageia release 9 (Official) for x86_64


    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Wednesday, May 08, 2024 17:08:30
    On Wed, 08 May 2024 11:40:39 -0400, Grimble <grimble@nomail.afraid.org> wrote:
    That's interesting about /run - didn't realise it's temporary nature. webmin.conf does not exist in my /usr/lib/tmpfiles.d/
    /etc/tmpfiles.d/ is empty
    I've created webmin.conf as per your cat output, and I'll check after
    the next reboot.
    Thanks.

    /etc/tmpfiles.d/ is intended for temp file creation for packages from places other then Mageia, or as a place to override settings used by Mageia packages. It's empty unless you choose to create something there.

    Did you install webmin from Mageia?
    # rpm -q webmin
    webmin-2.013-1.mga9
    # rpm -ql webmin|grep tmpfiles
    /usr/lib/tmpfiles.d/webmin.conf

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From Grimble@2:250/1 to All on Thursday, May 09, 2024 12:18:22
    On 08/05/2024 17:08, David W. Hodgins wrote:
    On Wed, 08 May 2024 11:40:39 -0400, Grimble <grimble@nomail.afraid.org> wrote:
    That's interesting about /run - didn't realise it's temporary nature.
    webmin.conf does not exist in my /usr/lib/tmpfiles.d/
    /etc/tmpfiles.d/ is empty
    I've created webmin.conf as per your cat output, and I'll check after
    the next reboot.
    Thanks.

    /etc/tmpfiles.d/ is intended for temp file creation for packages from
    places
    other then Mageia, or as a place to override settings used by Mageia packages.
    It's empty unless you choose to create something there.

    Yes, I thought about that

    Did you install webmin from Mageia?
    No, from the webmin site and I always update from within webmin itself
    # rpm -q webmin
    webmin-2.013-1.mga9

    webmin-2.111-1

    # rpm -ql webmin|grep tmpfiles
    /usr/lib/tmpfiles.d/webmin.conf


    rpm -ql webmin|grep tmpfiles
    Empty
    Regards, Dave Hodgins

    Thanks for all your comments.
    --
    Grimble
    Machine 'Haydn' running Plasma 5.27.10 on 6.6.28-desktop-1.mga9 kernel.
    Mageia release 9 (Official) for x86_64


    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)
  • From David W. Hodgins@2:250/1 to All on Thursday, May 09, 2024 13:02:57
    On Thu, 09 May 2024 07:18:22 -0400, Grimble <grimble@nomail.afraid.org> wrote: >> Did you install webmin from Mageia?
    No, from the webmin site and I always update from within webmin itself

    Ok. That explains why the tmpfiles.d file was not included. I don't know what if any other Mageia customizations are included in the Mageia version.

    While the version from webmin is likely to contain some fixes and features not yet in the Mageia version, it's also likely to have some incorrect paths etc., and the Mageia version is tested, at least for basic functionality.

    Regards, Dave Hodgins

    --- MBSE BBS v1.0.8.6 (Linux-x86_64)
    * Origin: A noiseless patient Spider (2:250/1@fidonet)