2

This comes from here

Now it runs, but when i run it using the root crontab, it told me:

*tail: /var/log/backupeitor.log: file truncated
/bin/sh: /home/backup/scripts/backupeitor.pl: Permission denied*

Permissions for the file:

*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$* 

Any idea?

1
  • 2
    having permissions of 777 (rwxrwxrwx) is a bad idea. It isn't related to your error, but any other user or service on that system could arbitrarily modify those scripts to do anything they want, which would then be executed by root.
    – Zoredache
    Dec 20, 2012 at 22:21

2 Answers 2

2

Please check my answer in your other post, properly will fix both problems.

1

Done.

Shebang Changed, path to /usr/bin/perl changed as @John-Siu says it worked!

Thanks!

2
  • 1
    Please consider accepting(put a check mark) my answer on both questions. Thank you :)
    – John Siu
    Dec 21, 2012 at 1:08
  • This could be a comment, not an answer Dec 30, 2012 at 20:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .