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!

File ownership chown by mistkake on /home

Discussion in 'General Discussion' started by AntonVenter, Jan 19, 2012.

  1. AntonVenter

    AntonVenter Registered

    Joined:
    Jan 19, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Hi,

    By mistake I did a chown user:user -R /home/ use/public_html/* . The space caused me to chown the home directory instead of just the users. Now I am getting a permission denied error on all accounts. I have tried to change the ownership back but now I am getting error 500 Internal errors.

    It seems that because the ownership has changed to a user's account, all accounts are getting this error 500 Internal server error. How can set the correct ownership of all files in /home, not just the users' files?

    Help would be greatly appreciated
    Anton
     
  2. alphawolf50

    alphawolf50 Well-Known Member

    Joined:
    Apr 28, 2011
    Messages:
    186
    Likes Received:
    2
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hi Anton,

    /home/ should be owned by root, so:
    Code:
    chown root:root /home
    After that each user's folder is of course owned by user:user.

    Unfortunately, some of the subfolders have different group permissions. For example:

    /home/user1/public_html/ would be owned by user1:nobody.
    /home/user1/.htpasswds/ would be owned by user1:nobody
    /home/user1/etc/ would be owned by user1:mail

    You'll probably find others that need fixed as well, but that should get you started.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,323
    Likes Received:
    1,851
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello :)

    The "500" error message likely stems from the ownership of the public_html directory. As mentioned in the previous response, ensure the public_html directory is owned by "user:nobody".

    I also suggest reading the following post for future reference on why it's not a good idea to do a recursive chown:

    suPHP Permissions

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. AntonVenter

    AntonVenter Registered

    Joined:
    Jan 19, 2012
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Root Administrator
    Thank you both for replying! By setting the ownership of /home back to root:root resolved the issue.
     
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