Re: Cron

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On December 16, 2003 08:47 am, Mike Koponick wrote:
> Here is an output of my /etc/cron.daily directory. As you can see, the
> permissions are all correct. The problem file is the 000backup.sh
> script.
>
> The scripts that are named 000report_gen and 00log_archiver work
> flawlessly. These are two scripts that were made about the same time at
> 000backup.sh.
>
> 000backup.sh works fine if you were to execute it locally.
>
> [root@console cron.daily]# ls -l
> total 52
> -rwxr-xr-x    1 root     root           65 Dec 12 09:15
> 0000postfix-restart
> -rwxr-xr-x    1 root     root          205 Dec 13 09:27 000backup.sh
> -rwxr-xr-x    1 root     root          158 Oct 21 07:40 000report_gen
 
> Here is the script "000backup.sh"
>
> cd /var/programs/backup_program
> ./backup_script.sh
> ls -R /var/tftp/Backup/ > /tmp/backup_report.txt
> mail -s "Weekly Backup Report" mike@xxxxxxxxxxxx <
> /tmp/backup_report.txt



Mike,
everything there looks fine. What is in
/var/programs/backup_program/backup_script.sh ?

Just to clearify, executing "/etc/cron.daily/000backup.sh" as root, runs 
properly?

You shouldn't need it, but you may also want to put a path for the mail 
command (just a good security practice) and add #!/bin/bash (presuming your 
sh is sym'd to bash)
-- 
Pete Nesbitt, rhce


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux