YunoHost-Apps / vaultwarden_ynh

Open source password management solutions for YunoHost
https://bitwarden.com/
GNU General Public License v3.0
54 stars 17 forks source link

The configuration of Bitwarden makes Logrotate to stop running #122

Closed csolisr closed 3 years ago

csolisr commented 3 years ago

Describe the bug

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

Steps to reproduce

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.