209738 Start rsync over webinterface

I have a Bash script that runs rsync to mirror files to other webservers.

The script runs over ssh with public key authentification.

This script is finished.

Now I need a PHP Script that runs this bash script.

So far the PHP Code goes like this:

<?php system("/home/user/[url removed, login to view]", $retval); ?>

The problem is, that the user www-data can't run the script because it has no access to the keys in .ssh.

To run the replication script you have to logged in as "rsync-user".

Please tell me how to enable the replication by just typing in the correct url to the php script on any webbrowser.

Kemahiran: Semua Boleh, PHP

Lihat lagi: bash 0, webbrowser, t sh, sh, bash script, access webbrowser, bash script data, webbrowser enable, run start, bash script public, webbrowser php script, replication php, script bash, key typing, authentification, run script ssh, files mirror script, script system logged user, rsync bash script, public key

Tentang Majikan:
( 38 ulasan ) Singapore, Switzerland

ID Projek: #1955965

Dianugerahkan kepada:


I'll need root access to the server (I'll need to make some modifications, maybe using sudo without a password, maybe changing some file permissions, I have to see exactly what is this about). I'll finish this in about Lagi

$30 USD dalam 0 hari
(104 Ulasan)