arfa Posted November 15, 2009 Share Posted November 15, 2009 I have a hacker on/in my site and the trick seems to be to change permissions on various files. Obviously I need to fix the hole and eject the hacker but, in the meantime I am having trouble resetting permissions. The file(s)/dirs in question are owner www-data [as opposed to ftpweb or base owner] I have tried resetting perms using: - my ftp client - no! - Using a backdoor chmod app on the same server within the same root - no! - A small php script chmod.php I wrote: <?php echo "<form action=chmod.php method=POST> <input type=text name=path size=50> <input type=submit value=CHMOD>"; if (isset($_POST['path'])) { $path = $_POST['path']; chmod($path,0755); echo $path; unset($_POST['path'],$path); } ?> I have this installed in the dir above the dir I want to change and have tried both absolute and relative paths. No change. Is there something missing in this code or is there an alternative. The directories have been changed to: 40700 - drwx------ GRrrrrrrr..... and other frustrated emoticons. Any suggestions? thanks - arfa Quote Link to comment Share on other sites More sharing options...
ram4nd Posted November 15, 2009 Share Posted November 15, 2009 try ssh, mayde you dont have the rights to change permissions Quote Link to comment Share on other sites More sharing options...
arfa Posted November 15, 2009 Author Share Posted November 15, 2009 You are right - I no longer seem to have permission. Weird. I am having a look at SSH - quite new to me. Thanks for the lead. I am also downloading a few "unix permissions basics" pages This is really bugging me. Quote Link to comment 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.