AW: call rsync from php script

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

 



Hi Jean-Christophe,
 
You need to source the ssh-key agent. I suggest you work with a tool like keychain.
 
And please configure some sort of protection/authentication
around your update.sh.
 
Regs,
 
Christian


Von: Jean-Christophe Roux [mailto:jcxxr@xxxxxxxxx]
Gesendet: Dienstag, 13. Mai 2008 11:59
An: users@xxxxxxxxxxxxxxxx
Betreff: call rsync from php script

Hello,

I have a bash script update.sh that contains:
rsync -- delete -avz -e ssh ${files} root@xxxxxx:/red
when I use that script ./update.sh as root, it works like a charm as I set up the private/public key properly.
When run from a php script through the apache webserver
<?php
exec("update.sh");
?>
The rsync line is ignored.
I understand that the php script is called under the apache user, when the private/public key is for my root user. How can I set the the keys so that the apache user can run fully the php script?

Thank you.



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux