File ownership chown by mistkake on /home

AntonVenter

Registered
Jan 19, 2012
3
0
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
 

alphawolf50

Well-Known Member
Apr 28, 2011
186
2
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,908
2,218
463
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.