每当 - Cron不工作?没有权限 [英] Whenever - Cron not working? Permission denied

查看:172
本文介绍了每当 - Cron不工作?没有权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经和wehenever一起设置了cron,但是它不工作。我试图手动运行该命令,我得到错误 / bin / bash:bin / rails:Permission denied

'I have set up a cron with wehenever, but its not working. I tried to run the command manually and i get the error /bin/bash: bin/rails: Permission denied.

这里cron的命令如下:

Here what the command of the cron looks like:

/ bin / bash -l -c'cd / var / www /净/主要bin / rails runner -e production'\''User.weekly_update'\'''

我也试过运行这个命令 $ root 但我得到了相同的消息。

I also tried to run this command as root but i got the same message.

推荐答案

bin / rails executable:

Try to make bin/rails executable:

chmod u+x bin/rails

这当然是假设bin / rails由crontab的用户拥有。

This is, of course, assuming that bin/rails is owned by the crontab's user.

这篇关于每当 - Cron不工作?没有权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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