H
H
HappyCougar2014-03-10 14:09:47
PHP
HappyCougar, 2014-03-10 14:09:47

How to prevent writing to files higher up the tree?

How to prevent php files from changing other files up the tree beyond a certain folder?
Set rights to this folder?
PS You need to put an infected backup, I'm afraid of spreading to other folders of this domain, or other domains lying on the same host.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vlad Zhivotnev, 2014-03-10
@inkvizitor68sl

Openbasedir must be enabled. In apache config something like this:
php_admin_value open_basedir "/home/somedir1/home/somedir2:."
In your case, it is strongly not recommended to enable it through htaccess (the Trojan will be able to rewrite it). Ask the hoster if you cannot change the Apache config yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question