AUTH(不允许crontab命令) - Bitnami LAMP堆栈centos [英] AUTH (crontab command not allowed) - Bitnami LAMP Stack centos

查看:761
本文介绍了AUTH(不允许crontab命令) - Bitnami LAMP堆栈centos的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置一个crontab以设置的间隔执行。 crontab作业被设置为在Apache上运行的我的PHP-Slim应用程序的一部分。由于某些原因,它只是不将作业添加到crontab,所以当我运行命令:

I'm trying to setup a crontab to execute at set intervals. The crontab job is setup as part of my PHP-Slim application running on Apache. For some reason, it just doesn't add the job to the crontab, so when I run the command:

crontab -u daemon -l

它表示没有crontab for daemon(守护程序是默认的Apache帐户)。我设法得到cronjob手动添加使用另一个帐户(它执行没有进一步的问题),所以它很可能是一个权限问题。什么是最好的方法来解决这个问题,而不诉诸chmod 777(它将是一个生产服务器,所以我需要仔细设置权限和记录他们)的东西?

It says 'no crontab for daemon' (daemon is the default Apache account). I did manage to get the cronjob manually added using another account (and it executes with no further issues) so it's most likely a permissions issue. What is the best way to troubleshoot this, without resorting to things like chmod 777 (it will be a production server so I need to careful with setting permissions and documenting them)?

推荐答案

在发布后管理以找到答案。

Managed to find the answer just after posting.

我在日志文件中查找cron:

I looked in the log file for cron:

cat /var/log/cron


$ b b

许多(守护程序)AUTH(不允许crontab命令)错误消息。一些进一步的搜索引导我看看 / etc / cron / allow ,它不存在,但 /etc/cron.deny ,并且守护进程帐户被列在那里。问题解决。

Lots of (daemon) AUTH (crontab command not allowed) error messages. Some further googling lead me to look at /etc/cron/allow which doesn't exist, but /etc/cron.deny does, and the daemon account was listed there. Problem solved.

这篇关于AUTH(不允许crontab命令) - Bitnami LAMP堆栈centos的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆