Re: AVC error in cron script - SOLVED?

2024-09-17 Thread Patrick O'Callaghan
On Mon, 2024-09-16 at 17:40 +0100, Barry wrote: > > > On 16 Sep 2024, at 10:48, Patrick O'Callaghan 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

Re: AVC error in cron script - SOLVED?

2024-09-16 Thread Jeffrey Walton
On Mon, Sep 16, 2024 at 12:41 PM Barry wrote: > > > On 16 Sep 2024, at 10:48, Patrick O'Callaghan 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

Re: AVC error in cron script - SOLVED?

2024-09-16 Thread Barry
> On 16 Sep 2024, at 10:48, Patrick O'Callaghan 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 sys

Re: AVC error in cron script - SOLVED?

2024-09-16 Thread Patrick O'Callaghan
On Thu, 2024-09-12 at 10:51 +0100, Patrick O'Callaghan wrote: > On Thu, 2024-09-12 at 12:14 +0930, Tim via users wrote: > > On Wed, 2024-09-11 at 12:19 +0100, Patrick O'Callaghan wrote: > > > Turns out I don't need any of this. If I substitute my original crontab > > > line for one that simply call

Re: AVC error in cron script - SOLVED?

2024-09-12 Thread Patrick O'Callaghan
On Thu, 2024-09-12 at 12:14 +0930, Tim via users wrote: > On Wed, 2024-09-11 at 12:19 +0100, Patrick O'Callaghan wrote: > > Turns out I don't need any of this. If I substitute my original crontab > > line for one that simply calls a Shell script which in turn calls > > apachectl, then it all works

Re: AVC error in cron script - SOLVED?

2024-09-11 Thread Tim via users
On Wed, 2024-09-11 at 12:19 +0100, Patrick O'Callaghan wrote: > Turns out I don't need any of this. If I substitute my original crontab > line for one that simply calls a Shell script which in turn calls > apachectl, then it all works with no AVC. ENVironment differences? The crontab versus your

Re: AVC error in cron script - SOLVED?

2024-09-11 Thread Patrick O'Callaghan
On Tue, 2024-09-10 at 11:55 -0500, Thomas Cameron wrote: > On 9/10/24 5:30 AM, Patrick O'Callaghan wrote: > > I have a cron line that attempts to restart httpd every morning, but > > it's failing with an AVC error: > > > > Sep 10 08:00:00 Bree CROND[723189]: (root) CMD ((echo "$(date): Apache: >

Re: AVC error in cron script

2024-09-10 Thread Thomas Cameron
On 9/10/24 5:30 AM, Patrick O'Callaghan wrote: I have a cron line that attempts to restart httpd every morning, but it's failing with an AVC error: Sep 10 08:00:00 Bree CROND[723189]: (root) CMD ((echo "$(date): Apache: calling restart") >> /var/log/httpd/my-log && /usr/sbin/apachectl restart)

Re: AVC error in cron script

2024-09-10 Thread Patrick O'Callaghan
On Tue, 2024-09-10 at 13:45 +0100, Barry wrote: > > > On 10 Sep 2024, at 11:31, Patrick O'Callaghan wrote: > > > > I have a cron line that attempts to restart httpd every morning, but > > it's failing with an AVC error: > > > > Sep 10 08:00:00 Bree CROND[723189]: (root) CMD ((echo "$(date): Ap

Re: AVC error in cron script

2024-09-10 Thread Barry
> On 10 Sep 2024, at 11:31, Patrick O'Callaghan wrote: > > I have a cron line that attempts to restart httpd every morning, but > it's failing with an AVC error: > > Sep 10 08:00:00 Bree CROND[723189]: (root) CMD ((echo "$(date): Apache: > calling restart") >> /var/log/httpd/my-log && /usr/s