Hello all, can anyone help me figure out what permissions/ownership settings and/or configuration changes I need to make to fix logrotate.service on my Fedora 41 host?

Here is what journalctl reports: https://pastebin.com/Hp31DJEX

It seems like the permission for /var/log/samba/ and /var/log/sshd/ might be messed up? I am struggling to find what the right ownership/permissions for these directories and files should be.

Additionally, when I look in /var/log/ I see many different log files for the same services:

https://pastebin.com/WXivZmST

  • ddittyOP
    link
    fedilink
    English
    1
    edit-2
    24 days ago

    Cool so I deleted that line. I’m just hoping to get logrotate to work normally with its default configuration lol.

    Here’s the output of ls -la /var/log/samba/

    total 32
    drwxr-x---.  3 root root 4096 Mar 22 12:39 .
    drwxr-xr-x. 14 root root 4096 Mar 31 03:47 ..
    drwx------.  7 root root   90 Mar 22 12:39 cores
    -rw-r--r--.  1 root root 4146 Mar 22 15:00 log.nmbd
    -rw-r--r--.  1 root root  189 Mar 22 11:40 log.rpcd_classic
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_epmapper
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_fsrvp
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_lsad
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_mdssvc
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_spoolss
    -rw-r--r--.  1 root root  188 Mar 22 11:40 log.rpcd_winreg
    -rw-r--r--.  1 root root    0 Mar 22 11:40 log.rpcd_witness
    -rw-r--r--.  1 root root  177 Mar 22 11:40 log.samba-dcerpcd
    -rwxrwx---.  1 root root  480 Mar 22 14:24 log.smbd
    -rwxr-x---.  1 root root    0 Mar 13 20:26 old
    

    I changed a few of these back to root:root ~ a week ago; I believe the ones for smbd and samba-dcerpcd were previously owned by a user and group I set up for my samba share which I think was also causing problems. Do you know if these are otherwise correct?

    I just ran sudo systemctl restart logrotate.service and it completed without issues. With that being said, it also completed without issues when I ran it the last couple times over the last few weeks with my old and broken config, so I’m unsure whether that single line fix from /etc/logrotate.d/samba is enough. Is there anything else you can think of I should be checking?