Permission denied website errors after editing user chown


May 26, 2018
cPanel Access Level
Root Administrator
Hello, I'm a new owner of a VPS and therefore have little experience with this level of root access. I've been a front-end developer for years and recently moved from shared hosting to a VPS. I run CentOS 7 x64. I worked mostly through SSH using Putty.

I have installed NodeJS and Composer (php packet manager), to install Composer, I had to create a non-root user for security reasons, as Composer stated (third party packages get the same permissions as the user installing it). This user is called 'alan', and was added to a new group 'admins'.

Furthermore, I gave 'alan' ownership over /home/accountname using the command
chown -R alan:admins /home/accountname
accountname = my hosting account, in which public_html is present.

Composer was installed with this account without issues, NodeJS was installed with the root account.

I believe that ever since the chown command, I have messed up file and folder permissions.
SSH and WHM works just fine, but the cPanel gives different errors such as:

The system failed to create the file “/home/accountname/.cpanel/datastore/.tmp.70657.MOUNTS_CACHE__proc_mounts” with permissions “0600” (as EUID: 1001, EGID: 1001) because of the following error: Permission denied

In an uneducated attempt I set the ownership of /home/accountname to root:root

As of now:
accountname chmod is 755
public_html chmod is 755
public_html's .htaccess chmod is 644
folder chmod is 755
upper-level files are chmod 644

What can be done to fix cPanel and access to my websites?


Product Owner II
Staff member
Nov 14, 2017
Hi @alanhxg

It sounds like the issue is a result of an ownership change. Default account ownership is the UID/GID of the user so typically that is user:user you noted you modified it to alan:admin - do you continue to experience the issue if you modify the ownership to user:user?