P
P
PO6OT2015-04-04 16:02:06
PHP
PO6OT, 2015-04-04 16:02:06

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

3 answer(s)
X
xmoonlight, 2015-04-04
@woonem

From eval () - nothing will save.
Set up permissions .

F
FanatPHP, 2015-04-04
@FanatPHP

remove from script.php all code that can change the ./apps folder
And rights have nothing to do with it

V
vaut, 2015-04-04
@vaut

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 question

Ask a Question

731 491 924 answers to any question