Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Permission denied website errors after editing user chown

Discussion in 'General Discussion' started by alanhxg, May 26, 2018.

  1. alanhxg

    alanhxg Registered

    Joined:
    May 26, 2018
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Belgium
    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?
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II
    Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    3,066
    Likes Received:
    214
    Trophy Points:
    173
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    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?


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice