Can I include files between accounts?


Apr 11, 2014
cPanel Access Level
Website Owner
I have a webhosting account that allows me to host multiple domains, each of which has its own CPanel. All of my sites are essentially one big CMS; all the satellite sites are built on includes hosted by the main website.

I've been doing this for years with no problems until today. I've been working on a major upgrade, which includes PDO database queries. Today, I asked support to enable PDO online, so they did - and my websites crashed. They couldn't figure out what the problem was, so I asked them to disable PDO.

That restored my websites - but my includes no longer work. My includes look something like this:

include ("/home/geobear2/public_html/$MyPHP/dbc.php");

Now I get the error "failed to open stream: Permission denied."

My support tech told me you can't include files between CPanel accounts; he said he can't understand how I ever did it in the first place.

So I'm totally confused. I have over a dozen websites with over 50,000 web pages - and they're all fried. Is it true that you can't include files between websites running CPanel? If so, is this because of some technical problem or is it in administrative problem (i.e. CPanel doesn't want users to include files between sites)?

If it CAN be done, can someone please tell me how to do it? Thanks.s

P.S. I'm working with PHP and MySQL and am using MAMP on a Mac.


Well-Known Member
Oct 27, 2005
You should NEVER be able to share files between cPanel accounts!!!! That is a huge security risk. Like your admin, I can't believe you could do it before!

If you can include files from another site, then you could basically read other people's accounts. That would be bad.

There really isn't a good work around for this other than moving all of the accounts into one cPanel account and make the sites addons. They they would be all in the same account and could share files.


Staff member
Apr 11, 2011
Hello :)

Using a path to files from another account is not recommended. Ideally, you should simply upload the same set of files to the accounts. Or, since you own all of the websites, you could setup the additional accounts as addon domain names instead of keeping them separate.

Thank you.