On Mon, Sep 16, 2024 at 12:41 PM Barry barry@barrys-emacs.org wrote:
On 16 Sep 2024, at 10:48, Patrick O'Callaghan pocallaghan@gmail.com wrote:
I suspect the real problem is that the cron line is running as root, but Apache wants to run as the apache user. I'll try using 'crontab -u apache ...' to see if that makes any difference.
You said the the apachectl just rund a systemctl command. That means it is the permission to run systemctl that should be the important factor. Systemctl will run the restart as the right user.
So root will be correct, I assume.
That depends. Under SELinux, root is just another account that can be contained. So it is possible root does not have the required rights and privileges. And it depends on whether SELinux is in enforcing mode.
With that said, root is probably enough.
Jeff