relative_noob Posted January 24, 2007 Share Posted January 24, 2007 Hello all,I am struggling with the exact problem reference here: http://www.zend.com/zend/spotlight/shellscriptingp1.php?article=shellscriptingp1&kind=sl&id=2237&open=1&anc=0&view=1In the discussion at the bottom of the page, there is a question:"So that begs the question, that since PHP is typically run as nobody or apache with no shell and no home, how does one gen a public key to give to the remote host for nobody or apache --- so the scp can actually take place??"Please help as this problem is making me insane...Thanks in advance Link to comment https://forums.phpfreaks.com/topic/35509-advice-on-using-scp-with-php/ Share on other sites More sharing options...
trq Posted January 24, 2007 Share Posted January 24, 2007 If you have a user account, you [i]may[/i], depending on the setup, be able to use sudo to exec the command. eg;[code]exec('sudo -u username scp remote:file local:file');[/code] Link to comment https://forums.phpfreaks.com/topic/35509-advice-on-using-scp-with-php/#findComment-168047 Share on other sites More sharing options...
relative_noob Posted January 24, 2007 Author Share Posted January 24, 2007 Hello,Yes, I have tried that option without success. :-[I appreciate your help.Any other ideas?Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/35509-advice-on-using-scp-with-php/#findComment-168050 Share on other sites More sharing options...
trq Posted January 24, 2007 Share Posted January 24, 2007 What do you meen by 'without success'? Do you have access to sudo? Have you setup rsa keys for your current user?I really don't see any other option. Link to comment https://forums.phpfreaks.com/topic/35509-advice-on-using-scp-with-php/#findComment-168111 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.