これらのクローンファイルのセキュリティコンテキストは何ですか?

これらのクローンファイルのセキュリティコンテキストは何ですか?

私はFedora 20を実行しており、logrotateとanacronを実行する際にいくつかの問題があります。 SELinuxと関連があると思われます。

Failed to determine timestamp: Cannot assign requested address
chgrp: changing group of /var/log/mariadb: Permission denied

ちょっと調べて、こんな文を見つけました。Gentoo Wiki内容は次のとおりです。

cronjobを使用してシステム管理タスクを実行する場合は、タスクが実行されるドメインに対する十分な権限があることを特に注意する必要があります。

まず、cronjobがsystem_cronjob_tドメインで実行されていることを確認してください。これは、cronjobを次のように定義する必要があることを意味します。

scripts in the /etc/cron.hourly, /etc/cron.daily, ... directories
crontab entries in the /etc/cron.d directory
crontab entries in the /etc/crontab file

私のSELinuxの基本ポリシーを確認すると、次のポリシーがあることがわかりました。

/etc/cron.daily(/.*)?    all files      system_u:object_r:bin_t:s0 
/etc/cron.hourly(/.*)?   all files      system_u:object_r:bin_t:s0 
/etc/cron.monthly(/.*)?  all files      system_u:object_r:bin_t:s0 
/etc/cron.weekly(/.*)?   all files      system_u:object_r:bin_t:s0 
/etc/cron\.d(/.*)?       all files      system_u:object_r:system_cron_spool_t:s0 
/etc/crontab             regular file   system_u:object_r:system_cron_spool_t:s0

system_cronjob_tシチュエーション固有のラベルになるようにSELinuxポリシーを変更する必要がありますか?

ベストアンサー1

次のようにする必要があります。

selinux-policy-3.12.1-139の変更ログ:

- bin_tを介してsystemd_cronjob_tをインポートできるようにする

/var/log/audit/audit.logに関するエラーがありますかmariadb?迅速かつ簡単な確認は、タスクをsetenforce=0実行することですcron。パフォーマンスが良い場合は、SELinuxが問題の原因です。

おすすめ記事