crontab 和 selinux

crontab 和 selinux

我在 RHEL 7 上安装了 Drupal 7,看起来 SELinux 阻止了 crontab。 aureport -a秀斯

90. 11/27/2015 01:32:35 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10061 91. 11/27/2015 01:42:35 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10062 92. 11/27/2015 01:52:43 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10063 93. 11/27/2015 02:02:48 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10069 94. 11/27/2015 02:13:02 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10081 95. 11/27/2015 02:23:02 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10082 96. 11/27/2015 02:33:03 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10083 97. 11/27/2015 02:43:03 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10084 98. 11/27/2015 02:53:09 httpd system_u:system_r:httpd_t:s0 87 file unlink system_u:object_r:httpd_log_t:s0 denied 10094

看起来这也是 Drupal Ultimate cron 尝试启动的 10 分钟时间段。我很确定 SELinux 的问题,但我找不到任何可以理解的解决方案。

答案1

错误信息不是在谈论crontab,而是httpd(Apache)。

通过暂时关闭 SELinux 开始调查:

setenforce 0

(这将解决最多但不是全部的堵塞)。问题通常可能是固定的semanage通过(如果 Drupal 的文件存储在 SELinux 不期望的某个位置)使用 SELinux 设置之一,或使用restorecon(修复文件系统的元信息)。

作为最后的手段,你可以使用审核2允许

以供参考:

相关内容