Announcement

Collapse
No announcement yet.

Logrotate service failed to start

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Logrotate service failed to start

    Hi friends, I recently installed Kubuntu 24.04 and I am loving it. Everything works great and I am dilligenty updating whenever the software updater says there is updates. But a few days ago I noticed the following message when booting and shuting down which wasn’t there earlier:

    «Logrotate service failed to start»

    This message stays on the screen for a few seconds when booting up and shuting down.

    What does this mean? It doesn’t affect the use of the computer AFAIK, but is it something that should be fixed… and how do I fix it?

    I am not running dual boot, Kubuntu is only OS on PC.

    Thank you.
    Last edited by Grimnir; Aug 29, 2024, 11:52 PM. Reason: Not solved after all

    #2
    Ok I am sorry to say that this is not solved after all. I still get the message "Logrotate service failed to start" when booting and shutting down.

    But I did some research and found out that if I change ProtectSystem from "full" to "none" in logrotate.service, then the error message disappears.

    Here is the current content of my logrotate.service file.
    Code:
    [Unit]
    Description=Rotate log files
    Documentation=man:logrotate(8) man:logrotate.conf(5)
    RequiresMountsFor=/var/log
    ConditionACPower=true
    
    [Service]
    Type=oneshot
    ExecStart=/usr/sbin/logrotate /etc/logrotate.conf
    
    # performance options
    Nice=19
    IOSchedulingClass=best-effort
    IOSchedulingPriority=7
    
    # hardening options
    #  details: https://www.freedesktop.org/software/systemd/man/systemd.exec.html
    #  no ProtectHome for userdir logs
    #  no PrivateNetwork for mail deliviery
    #  no NoNewPrivileges for third party rotate scripts
    #  no RestrictSUIDSGID for creating setgid directories
    LockPersonality=true
    MemoryDenyWriteExecute=true
    PrivateDevices=true
    PrivateTmp=true
    ProtectClock=true
    ProtectControlGroups=true
    ProtectHostname=true
    ProtectKernelLogs=true
    ProtectKernelModules=true
    ProtectKernelTunables=true
    [B]ProtectSystem=none[/B]
    RestrictNamespaces=true
    RestrictRealtime=true
    But setting ProtectySystem=none doesn't seem like a good idea to me. Is there some other solution? Are some folders lacking the correct permissions?

    Any help is appreciated.

    Comment

    Working...
    X