LoginSignup
5
3

More than 5 years have passed since last update.

cron設定ファイルの所有者と権限について

Posted at

セキュリティ上の理由から、cronは設定ファイル(crontab および/etc/cron.d/ 以下に置いたファイル)にオーナー以外のユーザーの書き込み権限および実行権限がついていると、それを設定ファイルと見なしてくれない(※1)。

設定ファイルの所有者と権限は
-rw------- 1 root root
にする(※2)。

※1 cron のman の記述

CAVEATS
In this version of cron , without the -p option, /etc/crontab must not be writable by any user other than root, no crontab files may be links, or linked to by any other file,
and no crontab files may be executable, or be writable by any user other than their owner.

※2 セキュアな設定のガイド。108ページ目にcron設定ファイルに関する記載がある。
Redhat のドキュメントだが、CentOSでも同様の模様。
https://www.nsa.gov/ia/_files/os/redhat/rhel5-guide-i731.pdf

5
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
3