【发布时间】:2019-10-10 09:42:53
【问题描述】:
我在我的 yocto 项目(warrior 分支)中启用了 SELinux,但由于某些 SELinux 上下文问题,cron 无法正常工作。我正在使用minimum SELinux 策略。这是来自/var/log/messages的错误
Oct 9 04:50:01 panther2 cron.info crond[261]: ((null)) No SELinux security context (/etc/crontab)
Oct 9 04:50:01 panther2 cron.info crond[261]: (root) FAILED (loading cron table)
以下是相关文件的一些上下文,
root@panther2:~# ps -efZ | grep cron
system_u:system_r:kernel_t:s0 root 464 1 0 04:54 ? 00:00:00 /usr/sbin/crond -n
root@panther2:~# ls -lZ /etc/crontab
-rw-------. 1 root root system_u:object_r:unconfined_t:s0 653 Oct 9 2019 /etc/crontab
root@panther2:~# ls -lZ /usr/sbin/crond
-rwxr-xr-x. 1 root root system_u:object_r:unlabeled_t:s0 68160 Oct 9 2019 /usr/sbin/crond
有什么帮助吗?谢谢!!
【问题讨论】:
-
这似乎是一个错误(bugzilla.redhat.com/show_bug.cgi?id=591587),但找不到合适的修复。