Public bug reported:
Hello,
I'm running SSSD on Ubuntu 24 and the logrotate configuration that comes with
SSSD is creating the /var/log/sssd/sssd.log file owned by sysadmin:adm. Well
this is great, just that the second the logs rotate, SSSD complains about not
being able to write to those files. The fix is to create the files and have
them owner by root.
The original logrotate file:
```
/var/log/sssd/*.log {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
postrotate
kill -HUP `cat /var/run/sssd.pid` > /dev/null 2>&1 || true
endscript
}```
The following logrotate file does the job:
```
/var/log/sssd/*.log {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
su root root
create 0600 root root
postrotate
kill -HUP `cat /var/run/sssd.pid` > /dev/null 2>&1 || true
endscript
}
````
or, if a restart is ok:
```
/var/log/sssd/*.log {
rotate 4
weekly
missingok
notifempty
compress
delaycompress
su root root
create 0600 root root
postrotate
systemctl restart sssd || true
endscript
}
```
```
# lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04.4 LTS
Release: 24.04
# apt-cache policy sssd
sssd:
Installed: 2.9.4-1.1ubuntu6.5
Candidate: 2.9.4-1.1ubuntu6.5
```
** Affects: sssd (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158645
Title:
SSSD logrotate config
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/sssd/+bug/2158645/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs