Different owners for subdomains?

primerano

Registered
Sep 13, 2012
3
0
1
cPanel Access Level
Root Administrator
Is it possible to run blog.example.com and IANA — Example domains under different users?

I find that over time I end up with several apps under several subdomains. In the past one of those apps was compromised and this resulted in all my apps being vulnerable.

Because of that I run all my apps as different users.

It also seems a little crazy to me that the subdomains are under the main public_html directory. This means I can get to blog.example.com from example.com/blog.

Is there a way to segragate things? I think i can change the path for a subdomain easily enough but changing the owner would be even better IMO.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
Hello :)

Yes, it's acceptable to create a new account for each specific subdomain. You will need to ensure that subdomain is not already added to an existing account before creating a separate account for it.

Thank you.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator
If you don't want to create a new account, but also don't want the subdomains within public_html to possibly cause a compromise to the whole account, you can place the subdomain into /home/username/subdomainname location by changing the documentroot field for the subdomain on creation in cPanel > Subdomains area.

This would ensure the subdomain is separated from public_html content for the main domain and any other subdomain folders.