I have a perl script that I want to run as a perorate script for log rotate. When I force log rotate to run from the command line as
root, it works. However, when run through cron, SELinux prevents operation.
I don't remember what the first error was, but I fixed that using
audit2allow. The next day, I got a SELinux is preventing
/usr/bin/perl read access on the script. Fixed that, now I'm getting SELinux is preventing
/usr/bin/perl from open access on the script. I can't wait to see what I get tomorrow (since I can't just run the thing to test, given that it runs fine when I run it manually.)- probably something about writing to one of the output files.
Is there any way to short-circuit this iterative process and just say yes, perl can run this script, even when launched from log rotate?