【问题标题】:DirectAdmin Cron Job not running because cron-user permissionsDirectAdmin Cron 作业未运行,因为 cron-user 权限
【发布时间】:2016-02-17 06:43:52
【问题描述】:

我需要在我的 CentOS 7 DirectAdmin 安装上运行特定的 cronjob。 除了需要在数据库中导入一些东西的作业之外,所有的 cronjobs 都运行良好。

那个 cronjob 不能成功运行是因为 cron-user 权限。 用户拥有来自 DA 的 SHELL 访问权限。

如何以及在哪里可以编辑 cron 用户权限?

我使用这个 crontab:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOME=/

# For details see man 4 crontabs

# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed

*/5 * * * * root /bin/sh /home/[path-to-magento-install]/public_html/cron.sh

【问题讨论】:

    标签: magento cron sh centos7 directadmin


    【解决方案1】:

    我建议你在 directadmin 用户下添加这个 magento cron 并为该用户启用 SHELL 访问权限,这样你的 cron 就不会获得权限和任何其他问题。

    【讨论】:

    • 我已经在 DirectAdmin 中添加了用户。我还为该帐户使用了我的管理员用户,因此我不使用经销商和用户级别来定义用户。我的管理员用户是我使用的唯一用户。那也是运行这个 cron 的用户。所以它应该有所有的访问权限,还有 SHELL,不是吗?
    猜你喜欢
    • 2014-11-02
    • 2016-05-18
    • 2020-03-16
    • 2011-09-14
    • 2014-04-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多