Note: You need root access to your server for using that command (VPS or Dedicated server)
open command line (use PuTTY or SSH) and use this command (recursively locks for writing all files under httpdocs)
chattr +i -R /var/www/vhosts/example.com/httpdocs
Thats it! Your files are completely secure.
when you need to unlock files to write use that command (recursively un-locks for writing all files under httpdocs)
chattr -i -R /var/www/vhosts/example.com/httpdocs
when you need to lock specific file use that;
chattr +i /var/www/vhosts/example.com/httpdocs/index.php
to unluck specific file
chattr -i /var/www/vhosts/example.com/httpdocs/index.php
******************************
chattr command is used to change the file attributes. This is an admin command. Root user only can change the file attributes/Process.
More...





LinkBack URL
About LinkBacks









Bookmarks