I have a site built on the ModX Evo CMS. I have noticed that almost every day the .htaccess file is deleted meaning the FURLs no longer work. I have scanned for viruses and found nothing. Does anyone know what this means or what I can do?



  1. ModX EVO CMS is deleting it
  2. Malware/Virus is deleting it
  3. Shared Hosting is causing it, i.e malware/virus on another user account spreading to yours.
  4. Web host is deleting it for one reason or another.

How to Investigate

  1. Contact your web host if shared hosting
  2. Check logs

Quick Fix

I'm assuming that you are using CHMOD 744 or 777, there is no reason why the owner group would require write access, so it's time to revoke write permissions.. this will mean that the file can not be deleted, can't be altered, unless you login via control panel or FTP and chmod before hand.

Change the CHMOD of the htaccess to 444, this will disable write permissions on public, group and owner. Additionally if your CMS uses a config file that is used to content to the database you can also use this to further your security. As I normally say in another of answers on Pro Web Masters.. Never under estimate the power of CHMOD, it causes problems for hackers, malware, and just generally stuff you don't want happening to your site.

  • Hmm its weird - when I try to alter the permissions via FTP it just reverts back to 644. Is this meant to occur?
    – MeltingDog
    Apr 12 '13 at 0:03
  • do in control panel Apr 12 '13 at 0:11
  • Hmm for whatever reason the file is not showing in filemanager... perhaps because it is a .htaccess file?
    – MeltingDog
    Apr 12 '13 at 0:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.