Skip to contentSkip to main navigation Skip to footer

How To Change .htaccess Permission To Read Only

It is a very good idea to set read-only access to certain folders and files. Although you can’t do this in your .htaccess, you can do it at the server panel or OS level.

It’s important that you set permissions on your configuration files and files that include connection settings as read-only.


Apache/Litespeed/Nginx Servers

For Unix/Linux systems set the .htaccess permission file to 444.

WinSCP sFTP client

If you cannot do this with your FTP software, try using the File Manager supplied with your webhosting account.

Cpanel .htaccess permission

Windows Servers

For Windows server systems, simply set the file as “Read-Only” for “Everyone” and especially the IUSR_xxxxx (Internet Guest Account) user if running IIS, or the “System” account or “apache user” if running Apache.

Windows Commander for IIS server