Change permissions via PHP is possible?
Hi all.
My question - though a beginner question- is simple. Is it possible to change permission via PHP code - or any other PL- ?
More Info: I have a wordpress site in a shared host. A hacker was using my site for sending mass spam emails, and host provider suspended my account (changed some folder permission to 000). Although i removed infected files, i couldn't find backdoor created by hacker. Now, i got to the point of restoring a healthy backup of 1 month ago. Also, i wanna change permission of nearly all folders to only readable/excutable (555). Does it prevents hacker from uploading new files /injecting malicious codes or it is still available via PHP coding?
Thanks in advance
(and sorry for bad english. I'm in emergency state now to keep my site alive)
-
Hello :) Changing permissions will not always address a vulnerability with a script. Is the script updated to the latest version? Is it a custom PHP script or a CMS such as WordPress? Thank you. 0 -
Yes. it is wordpress with lastest version. I wanted to restrict folders which not changing frequently and hence preventing hackers from uploading new files /injecting malicious codes into those folder. If he still can change permissions via PHP code (in other unrestricted folders), so changing permissions to 555 in cPanel is useless. 0 -
Do you have root access to this server? If not, please report the issue to your web hosting provider, as typically this needs to be addressed by someone with root access. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments