codehound Posted December 2, 2010 Share Posted December 2, 2010 I am working on a script that calls another script on a remote server. In PHP I have system("./testscript", out); the shell is rsh -l [server_user_name] [server_address] "mkdir testDir" This seems to a security issue as if you replace the mkdir command with ls you get the files in the directory. I was thinking it might be a chmod issue but that was not it. Any ideas? Quote Link to comment https://forums.phpfreaks.com/topic/220420-ssh-connection-issue/ Share on other sites More sharing options...
tomfmason Posted December 2, 2010 Share Posted December 2, 2010 What problem are you having? Do you see any errors? Basically I don't really understand what your question is here. Quote Link to comment https://forums.phpfreaks.com/topic/220420-ssh-connection-issue/#findComment-1142260 Share on other sites More sharing options...
dramamyth Posted December 2, 2010 Share Posted December 2, 2010 My guess would be that the 'nobody' account (ie. the default account web scripts run as) doesn't have write permission on the directory. Nor should it. You're subject line implies that you're using SSH - your code snippet implies that you're not. You should be. You should log into your server with SSH with an account that does have write access (presumably the same as you use to upload files) and do stuff with that. To use SSH in your PHP app check out phpseclib, a pure PHP SSH implementation. Quote Link to comment https://forums.phpfreaks.com/topic/220420-ssh-connection-issue/#findComment-1142262 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.