calling rsync from php script

From: Date: Tue, 13 May 2008 08:32:51 +0000
Subject: calling rsync from php script
Groups: php.general 
Request: Send a blank email to php-general+get-274231@lists.php.net to get a copy of this message
Hello, I have a bash script update.sh that contains: rsync -- delete -avz -e ssh ${files} root@64.XXX:/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? More generally, how do php users handles the ssh private/public keys when calling rsync? Thank you

« previous php.general (#274231) next »