Answer the question
In order to leave comments, you need to log in
How to set permissions for a php file to prevent it from deleting/modifying or viewing a directory or file?
There is no access to the configurations, by the fact that I'm on a free hosting, there is only .htaccess and php.
How can I prevent ./script.php from deleting/modifying the ./apps folder?
Answer the question
In order to leave comments, you need to log in
remove from script.php all code that can change the ./apps folder
And rights have nothing to do with it
In your case, most likely not. Unless you just remove all code from script.php that can change the ./apps folder.
If there was a full-fledged machine, then using the SELinux setup. Without it, if all the code is executed from one user, then the rights will be the same. And PHP as CGI will have to be done.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question