YunoHost-Apps / shaarli_ynh

Shaarli package for YunoHost
GNU General Public License v3.0
20 stars 13 forks source link

Logrotate config is missing specific_user #83

Closed Salamandar closed 10 months ago

Salamandar commented 1 year ago

The log file (/var/www/shaarli/data/log.txt) is not owned by root, so logrotate fails:

logrotate[1744762]: error: skipping "/var/www/shaarli/data/log.txt" 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.

Adding this line to the logrotate file fixes the issue:

    su shaarli shaarli

so the install and upgrade scripts should have :

ynh_use_logrotate --specific_user=shaarli
lapineige commented 1 year ago

Thanks a lot !