quackmore Posted November 18, 2022 Share Posted November 18, 2022 I've installed Armbian 22.08 Jammy (CLI only) on a Orange Pi 3 LTS and it works like a charm but, apparently installing postgresql breaks logrotate.service... actually on reboot syslog shows the following: ... armbian-ramlog[2065]: /usr/lib/armbian/armbian-ramlog: line 153: /var/log/./postgresql/postgresql-14-main.log: Permission denied ... systemd[1]: logrotate.service: Control process exited, code=exited, status=1/FAILURE ... systemd[1]: logrotate.service: Failed with result 'exit-code'. ... systemd[1]: Failed to start Rotate log files. some things I found out after a shallow research: postgresql package post installation script manages the log files access permissions slightly differently from other packages, assigning ownership to root:postgres instead that root:adm. I mean this is what you get after postresql installation: ls -al /var/log ... drwxr-xr-x 2 root adm 4096 Nov 16 16:58 nginx drwxr-xr-x 2 root root 4096 Mar 22 2022 openvpn drwxrwxr-t 2 root postgres 4096 Nov 17 18:20 postgresql ... changing postgresql log files access permissions to root:amd fixes the problem and makes logrotate.service run fine after a SBC reboot the postgresql file access permissions are restored to root:postgres (weird!!! is this because it's zram?) I currently fixed the problem running a crontab script at reboot that sets the 'proper' access permissions and restart the logrotate.service, but I'm confident there must be a cleaner solution... Anyone? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.