By default, the configuration of Bitwarden causes the Logrotate program to stop running.
error: skipping "/var/log/bitwarden/bitwarden.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
This can be fixed by adding the next line to /etc/logrotate.d/bitwarden:
su bitwarden bitwarden
Context
Hardware: Raspberry Pi 4
YunoHost version: 4.1.7.4
I have access to my server: Through SSH and direct access
Are you in a special context or did you perform some particular tweaking on your YunoHost instance?: no
Using, or trying to install package version/branch: 1.19.0
Steps to reproduce
Install the application
sudo yunohost app install bitwarden
Check the status of logrotate
sudo systemctl status logrotate.service
Expected behavior
The log rotation should keep working as usual, instead of crashing.
Logs
sudo systemctl status logrotate
● logrotate.service - Rotate log files
Loaded: loaded (/lib/systemd/system/logrotate.service; static; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2021-03-27 21:34:36 CST; 35s ago
Docs: man:logrotate(8)
man:logrotate.conf(5)
Process: 8928 ExecStart=/usr/sbin/logrotate /etc/logrotate.conf (code=exited, status=1/FAILURE)
Main PID: 8928 (code=exited, status=1/FAILURE)
mar 27 21:34:04 azkware.net systemd[1]: Starting Rotate log files...
mar 27 21:34:36 azkware.net logrotate[8928]: error: skipping "/var/log/bitwarden/bitwarden.log" because parent directory has insecure permissions (It's world writable or writable by group which is not "root") Set "su" directive in config file to tell logrotate which user/group should be used for rotation.
mar 27 21:34:36 azkware.net systemd[1]: logrotate.service: Main process exited, code=exited, status=1/FAILURE
mar 27 21:34:36 azkware.net systemd[1]: logrotate.service: Failed with result 'exit-code'.
mar 27 21:34:36 azkware.net systemd[1]: Failed to start Rotate log files.
Describe the bug
By default, the configuration of Bitwarden causes the Logrotate program to stop running.
This can be fixed by adding the next line to
/etc/logrotate.d/bitwarden
:Context
Steps to reproduce
logrotate
Expected behavior
The log rotation should keep working as usual, instead of crashing.
Logs
sudo systemctl status logrotate