Quantcast
Channel: Plesk Forum
Viewing all articles
Browse latest Browse all 45760

Rsync in PHP script

$
0
0
Hello,

I have an issue with a PHP script that execute a SH file.

My PHP script :
$output = shell_exec('sh api/fichier_bash.sh');
echo "$output";

My SH file :
#!/bin/bash

/usr/bin/rsync -e ssh -avzru --delete-after /absolute_path/sound.wav root@IP:/absolute path

echo "Hello"

If i go to my php web page, it print "Hello" but the file dosen't send in my remote server.
I didn't see in plesk the sudoers file to give permission for the apache user to execute a rsync command...

Read more

Viewing all articles
Browse latest Browse all 45760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>