Selinux blocks the crontab command from php
问题 There are Fedora 25 and apache on our server. I want to do so that the php script on our web site can change crontab settings. I created the following test php script: <?php system("echo '*/2 * * * * date > /var/www/logs/testlog.txt' | crontab - 2>&1"); But it did not work. I got the message: /var/spool/cron/#tmp.mh203-95.XXXXG0KrFF: Permission denied I looked at output of sealert -a /var/log/audit/audit.log and found: SELinux is preventing crontab from write access on the directory /var