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?

PsySkeletor
  • 181
  • 1
  • 13
  • 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 '12 at 22:21

2 Answers2

2

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

John Siu
  • 3,667
  • 2
  • 17
  • 23
1

Done.

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

Thanks!

PsySkeletor
  • 181
  • 1
  • 13