simon-g Posted August 21, 2008 Share Posted August 21, 2008 Hi, Im looking for some pointers for an idea I have. Im looking into a way in which I can get a user over a web browser to execute remote commands to Linux. For example, if a user Pressed button 'X' button 'X' would go and tell the server(being Linux machine) to copy a folder for example. Is there a way this can be achieved using PHP, if so could you please give me some pointers where I should be looking into researching. Regards, Simon. Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/ Share on other sites More sharing options...
lemmin Posted August 21, 2008 Share Posted August 21, 2008 shell_exec() would probably work: http://us3.php.net/manual/en/function.shell-exec.php Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622298 Share on other sites More sharing options...
simon-g Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks for that, ive given it a go on my local machine, it doesnt seem to allow basic cp or mv commands even into the public_html directory. Any ideas? Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622348 Share on other sites More sharing options...
lemmin Posted August 21, 2008 Share Posted August 21, 2008 Try giving your web user full access rights to the system32 folder. Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622353 Share on other sites More sharing options...
simon-g Posted August 21, 2008 Author Share Posted August 21, 2008 Its running on Linux, ubuntu. Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622354 Share on other sites More sharing options...
BlueSkyIS Posted August 21, 2008 Share Posted August 21, 2008 i use exec() to run commands like mogrify. Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622370 Share on other sites More sharing options...
simon-g Posted August 21, 2008 Author Share Posted August 21, 2008 Thanks for that, ive given it a go on my local machine, it doesnt seem to allow basic cp or mv commands even into the public_html directory. Any ideas? Fixed it permissions were wrong Link to comment https://forums.phpfreaks.com/topic/120745-php-interaction-linux/#findComment-622413 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.