Prevent access from add-on domain root to other folders

Enis Begovic

Registered
Feb 7, 2019
1
0
1
Australia
cPanel Access Level
Website Owner
Hi there,
I've been trying to figure out if add-on domains can be prevented from accessing folders outside its specified root folder. I had one of my add on domain websites hacked and then I found suspicious files all over the server everywhere.
I found this advice on the forum that say I need separate hosting accounts to prevent this from happening. Commons sense but I already paid big bucks to have one large hosting plan.

Does anyone else have any ideas how this can be prevented with .htaccess or something that doesn't allow directory browsing outside add on domain's root directory or something.

I'll appreciate any advice.
Thank you,
Enis
 

cPanelLauren

Product Owner II
Staff member
Nov 14, 2017
13,266
1,301
363
Houston
Hello,
Hi there,
I've been trying to figure out if add-on domains can be prevented from accessing folders outside its specified root folder. I had one of my add on domain websites hacked and then I found suspicious files all over the server everywhere.
I found this advice on the forum that say I need separate hosting accounts to prevent this from happening. Commons sense but I already paid big bucks to have one large hosting plan.

Does anyone else have any ideas how this can be prevented with .htaccess or something that doesn't allow directory browsing outside add on domain's root directory or something.

I'll appreciate any advice.
Thank you,
Enis
Unfortunately in the way you're referencing this isn't possible. While an account level compromise wouldn't allow for access to an entire server, your entire account or anything with the same user/group is susceptible.