Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KitaitiMakoto/7b51ef86a41f3163ceef to your computer and use it in GitHub Desktop.
Save KitaitiMakoto/7b51ef86a41f3163ceef to your computer and use it in GitHub Desktop.
ItamaeでSELinuxセキュリティコンテクストを管理したい

Chefだとこの辺。

cp使って、あとからrestoreconするやりかただと、.htaccessやcrontab、それ以外でもリアルタイムで読むファイルが辛い。

あと、CentOS 7で何もしてないと

$ sudo restorecon /var/spool/cron/takahiromurayama
restorecon:  Warning no default label for /var/spool/cron/takahiromurayama

で、ユーザー別crontabは、semanage/etc/selinux/targeted/contexts/files/file_contextsでセキュリティコンテクストを設定していないとrestoreconで戻らない。

参考:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment