Linux 如何确定 cron 配置文件的位置?
Linux how to determine cron config files location?
据我所知,我们可以设置为用户授予对 cron 设施的访问权限,也可以撤销某些用户的访问权限。
但我不知道将我的 cron 设置放在哪里阅读那些。我试过
(/etc/cron.allow, /ect/cron.deny), (/var/spool/cron/cron.allow, /var/spool/cron/cron.deny) 但它不起作用。添加到 cron.deny 的用户仍然可以访问 cron 工具。
如何确定在我的系统上放置 cron 设置的位置?
作为评论更新
我的情况是我创建了两个用户:user1、user2 并将 user1 添加到cron.allow,user2变成cron.deny。然后我为每个使用 crontab 的人创建一个工作,期望 user1 可以获得 cron 运行 而 user2 不会。但结果是 user2 也获得了 cron 作业 运行.
另外,我用 busybox crond 测试了这个。通过查看源代码,busybox 版本似乎根本不检查 cron.allow/cron.deny.
谁能确认一下?
谢谢
I test this with busybox crond. By Looking at source code, It seem
that busybox version not check cron.allow/cron.deny at all.
Can anyone confirm that?
我确认。 crond.c
nor crontab.c
contains "cron.allow" or "cron.deny". And this reflects the promises of BusyBox(我强调):
BusyBox combines tiny versions of many common UNIX utilities into a
single small executable.
… The utilities in BusyBox generally have fewer options than their
full-featured GNU cousins…
BusyBox has been written with size-optimization and limited resources
in mind.
据我所知,我们可以设置为用户授予对 cron 设施的访问权限,也可以撤销某些用户的访问权限。
但我不知道将我的 cron 设置放在哪里阅读那些。我试过 (/etc/cron.allow, /ect/cron.deny), (/var/spool/cron/cron.allow, /var/spool/cron/cron.deny) 但它不起作用。添加到 cron.deny 的用户仍然可以访问 cron 工具。
如何确定在我的系统上放置 cron 设置的位置?
作为评论更新
我的情况是我创建了两个用户:user1、user2 并将 user1 添加到cron.allow,user2变成cron.deny。然后我为每个使用 crontab 的人创建一个工作,期望 user1 可以获得 cron 运行 而 user2 不会。但结果是 user2 也获得了 cron 作业 运行.
另外,我用 busybox crond 测试了这个。通过查看源代码,busybox 版本似乎根本不检查 cron.allow/cron.deny.
谁能确认一下?
谢谢
I test this with busybox crond. By Looking at source code, It seem that busybox version not check cron.allow/cron.deny at all.
Can anyone confirm that?
我确认。 crond.c
nor crontab.c
contains "cron.allow" or "cron.deny". And this reflects the promises of BusyBox(我强调):
BusyBox combines tiny versions of many common UNIX utilities into a single small executable.
… The utilities in BusyBox generally have fewer options than their full-featured GNU cousins…
BusyBox has been written with size-optimization and limited resources in mind.