Accidentally ran chown -R /

hekg

Member
Nov 4, 2015
13
1
3
US
cPanel Access Level
Root Administrator
Good afternoon, last night I accidentally typed the following command as root via ssh and changed some permissions to account 'userx':

chown -R userx /

That permission change command only ran for about 5 seconds and I quickly forced stopped it.

Today the mail queue is not being delivered unless I manualy force deliver all mail in the queue in whm.

I don't know if that was the cause of this issue but a few minutes ago I ran the following command to try fix it and let that run for about 5 seconds then force stopped it.

chown -R root /

However, the problem with the mail queue is still there.

Can you please let me know if in fact that accidental few seconds of changing of permissions in / could be the problem and how can I check which essential directories and files actually got change and need to be set back to root permissions?

Thank you
 

hekg

Member
Nov 4, 2015
13
1
3
US
cPanel Access Level
Root Administrator
BTW, everything else including all websites on the server are running fine except that mail queue in whm is not automatically being delivered.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

It's very possible the ownership values are invalid and it might require a new installation of the OS and cPanel. You can review /usr/local/cpanel/logs/error_log to see the specific error message when accessing the mail queue. Also, review /var/log/exim_mainlog for additional error messages.

Thank you.
 

hekg

Member
Nov 4, 2015
13
1
3
US
cPanel Access Level
Root Administrator
Hi Michael, I tired to run both commands but I got a permission denied error for both :(

-bash: /usr/local/cpanel/logs/error_log: Permission denied
-bash: /var/log/exim_mainlog: Permission denied

What can I do at this point? Thanks very much
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
Hello :)

Those are log files as opposed to commands, so you have to view them with a command such as "tail -f". EX:

Code:
tail -f /var/log/exim_mainlog
Thank you.
 

CODERNATION

Registered
Dec 3, 2015
1
0
1
Califonia
cPanel Access Level
Root Administrator
help my admin ran chown -R of the root now my site - Removed - has 500 error and my other sites on the same hosting down how do i fix this
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
help my admin ran chown -R of the root now my site - Removed - has 500 error and my other sites on the same hosting down how do i fix this
That suggests the ownership for all files/directories on your system has been changed to "root". While you may find some manual commands that you can run to help resolve the issue, it's really a better idea to install a new OS and complete a new installation of cPanel. Then, restore the accounts on the new server from backup, or by using the transfer option in Web Host Manager if you have no previous backups available.

Thank you.
 
Last edited by a moderator: