Bernard, Yes, I solved my mystery.
I run my ssh-agent and output it's variables, which happened to be the environment settings into ssh-agent.cf ssh - agent - s | head - n 1 > ssh - agent . cf I then sourced the ssh-agent in my rsync script and my cron was able to run Richard Zulu Gtug Lead Kampala http://kampala.gtugs.org ----- Original Message ----- From: "Bernard Muluuta" <[email protected]> To: [email protected] Sent: Thursday, May 19, 2011 4:37:13 PM Subject: Re: [LUG] rsync and Cron Was this problem solved? Cheers, Bernard. On Thu, 2011-04-28 at 22:36 +0300, Peter C. Ndikuwera wrote: > Why not copy the private key to a directory readable by the cron user? > > > > -- > Evolution (n): A hypothetical process whereby infinitely improbable > events occur with alarming frequency, order arises from chaos, and no > one is given credit. > > > > On 27 April 2011 14:10, Richard Zulu <[email protected]> wrote: > Bernard, > > > I think so too, however, changing the permissions of the ssh > private key other than the ones shown below, ssh stops me from > using the key, complaining that they are too open > > > -rw------- 1 root root 744 2011-04-26 17:51 privatekey > > > > On Wed, Apr 27, 2011 at 2:03 PM, Bernard Wanyama > <[email protected]> wrote: > Sorry about that! > > Just saw the contents of the script. > To me, the permissions ssh keys might be the > issue...... > > Send us an ls -al of /root/.ssh/ > > Kind regards, > Bernard > > On 27 April 2011 14:00, Bernard Wanyama > <[email protected]> wrote: > > Hi Richard, > > > > I think it is time you revealed the contents of the > script! > > > > Does it run properly on its own, when executed from > the shell prompt? > > > > Kind regards, > > Bernard > > > > On 27 April 2011 13:28, Richard Zulu > <[email protected]> wrote: > >> Hallo Noah, > >> I set the UID to root however the same error > occurs, cron emails me > >> "permission denied" > >> Bernard, I removed output redirection however cron > still sends me the same > >> email with "Permission denied" > >> > >> On Tue, Apr 26, 2011 at 5:58 PM, Noah Sematimba > <[email protected]> wrote: > >>> > >>> On Apr 26, 2011, at 5:22 PM, Richard Zulu wrote: > >>> > >>> > 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. > >>> > >>> Actually it is not set to run with root > priviledges. It will run as the > >>> user cron. It would only run with root priviledges > if the permissions were > >>> rwsr-xr-x root root > >>> > >>> Root owning the script does not necessarily make > the script run with root > >>> priviledges unless you set the SUID bit. > >>> > >>> > >>> Noah. > >>> > >> > >> > >> > >> -- > >> 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. > >> > > > > > > > > -- > > Bernard Wanyama > > Technical Manager > > SYNTECH ASSOCIATES Ltd > > Cell: +256 712 193979 > > Fixed: +256 414 251591 > > Web: www.syntechug.com > > Email: [email protected] > > > > > > -- > Bernard Wanyama > Technical Manager > SYNTECH ASSOCIATES Ltd > Cell: +256 712 193979 > Fixed: +256 414 251591 > Web: www.syntechug.com > Email: [email protected] > _______________________________________________ > 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. > > _______________________________________________ > 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. _______________________________________________ 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.
_______________________________________________ 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.
