Noah, The script can be run as a normal user however, access to the Identity file (Key) won't be granted thus the script has it's UID set to root so it can be run with root privileges.
Simon, the script already has execute permissions. -rwxr-xr-x 1 root root 384 2011-04-26 16:17 rsyncrun.sh Tim, the owner (root) of the file /var/log/script_output.log has write permissions -rw-r--r-- 1 root root 6519 2011-04-26 17:45 /var/log/script_output.log On 4/26/11, Tim Schofield <[email protected]> wrote: > Hi, > > Do you have write permission on /var/log/script_output.log ? > > Thanks > Tim > > > On 26 April 2011 16:30, Richard Zulu <[email protected]> wrote: >> Hallo, >> Quick question here: >> I am rsyncing files from a remote computer to my local machine over the >> internet. Since the internet is not reliable. I have had to think about >> ways >> of automatically re-enabling rsync whenever it stops running because of >> internet disruptions. >> I have had to install an ssh-agent so that I do not have to input a >> password >> whenever I am starting rsync. >> I have also created a script to run rsync i.e check whether it is running >> and if it isn't, start it. I have put this script in my cron, however, >> cron >> runs the script but rsync does not start. >> Cron sends me an email that "Permission denied, please try again." >> My cron looks like this: */5 * * * * /root/rsyncrun.sh 2>&1 >> >> /var/log/script_output.log & >> My cron environment variables (/etc/crontab) are: >> SHELL=/bin/sh >> PATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin >> MAILTO=root >> However Script is written to use the bash shell >> #!/bin/bash >> Permissions on my script >> -rwxr-xr-x 1 root root 384 2011-04-26 16:17 rsyncrun.sh >> >> What could possibly be the problem as to why my rsync cron has permission >> denied? >> Thanks >> >> -- >> Richard Zulu >> gtug lead, Kampala (Uganda) >> http://kampala.gtugs.org >> >> >> >> _______________________________________________ >> The Uganda Linux User Group: http://linux.or.ug >> >> Send messages to this mailing list by addressing e-mails to: >> [email protected] >> Mailing list archives: http://www.mail-archive.com/[email protected]/ >> Mailing list settings: http://kym.net/mailman/listinfo/lug >> To unsubscribe: http://kym.net/mailman/options/lug >> >> The Uganda LUG mailing list is generously hosted by INFOCOM: >> http://www.infocom.co.ug/ >> >> The above comments and data are owned by whoever posted them (including >> attachments if any). The mailing list host is not responsible for them in >> any way. >> > > > > -- > WebERP Africa Ltd > +447710427049 > +256752963327 > +255758554413 > www.weberpafrica.com > _______________________________________________ > The Uganda Linux User Group: http://linux.or.ug > > Send messages to this mailing list by addressing e-mails to: [email protected] > Mailing list archives: http://www.mail-archive.com/[email protected]/ > Mailing list settings: http://kym.net/mailman/listinfo/lug > To unsubscribe: http://kym.net/mailman/options/lug > > The Uganda LUG mailing list is generously hosted by INFOCOM: > http://www.infocom.co.ug/ > > The above comments and data are owned by whoever posted them (including > attachments if any). The mailing list host is not responsible for them in > any way. > -- Richard Zulu gtug lead, Kampala (Uganda) http://kampala.gtugs.org _______________________________________________ The Uganda Linux User Group: http://linux.or.ug Send messages to this mailing list by addressing e-mails to: [email protected] Mailing list archives: http://www.mail-archive.com/[email protected]/ Mailing list settings: http://kym.net/mailman/listinfo/lug To unsubscribe: http://kym.net/mailman/options/lug The Uganda LUG mailing list is generously hosted by INFOCOM: http://www.infocom.co.ug/ The above comments and data are owned by whoever posted them (including attachments if any). The mailing list host is not responsible for them in any way.
