S
S
Sergey Korenevsky2017-10-16 21:38:17
PHP
Sergey Korenevsky, 2017-10-16 21:38:17

How to restrict the writing of files in folders (for example, through .htaccess)?

After the site is made, it is necessary that the CMS is not updated anymore. But so that the protection of the outdated CMS is not infected with a virus. It is necessary to forbid writing files in folders. Only of course the images folder had write access.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
Boris Korobkov, 2017-10-16
@BorisKorobkov

it is necessary that the CMS is not updated anymore

Bad idea.
useradd, chown, chmod.
In the presence of holes, the prohibition from writing files will not prevent the site from being hacked. For example, through modifying the database, files in images, tmp, stealing the admin password, etc.

A
alex stephen, 2017-10-17
@berezuev

You can restrict the entry through chmod, and this is the only correct way.
But, as Er Code said , if you are afraid of viruses, make backups.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question