这来自这里
现在运行,但是当我使用root crontab运行它时,它告诉我:
*tail: /var/log/backupeitor.log: file truncated /bin/sh: /home/backup/scripts/backupeitor.pl: Permission denied*
文件权限:
*srv156:/home/backup/scripts$ ls -alrt insgesamt 28 drwxrwxrwx 2 root root 4096 19. Sep 13:23 off -rwxrwxrwx 1 root root 1274 24. Okt 15:16 backup_mysql.sh -rwxrwxrwx 1 root root 302 24. Okt 15:16 backup_postgres.sh drwxrwxrwx 5 root root 4096 18. Dez 14:55 .. drwxrwxrwx 3 root root 4096 20. Dez 09:48 . -rwxrwxrwx 1 root root 3393 20. Dez 22:49 backupeitor.pl srv156:/home/backup/scripts$*
任何想法?
请检查我的答案在您的其他职位,妥善将解决这两个问题。
完成。
Shebang改变了,/ usr / bin / perl的path改成了@ John-Siu说的那样!
谢谢!