Most shared hosting packages store all files of a given user under something like /user/myuser/www/
or /var/html
.
Addon domains are usually located under /var/html/domain1.com/
, /var/html/domain2.com
.
Is there a way to (using .htaccess) prevent one addon domain from accessing the files of another domain and a potential malicious script (e.g. a rogue theme) from reading or executing or writing files to another addon domain's folder?
This way, if one site is compromised, the others will not be affected.
I realize this is not the only required step to harden the security of a WordPress installation but it's a good starting point to prevent a potential exploit from doing too much damage.
/user/myuser/domains/domain1.com
and/user/myuser/domains/domain2.com
. This will make one domain files inaccessible from other domains.