The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accidentally ran chown -R /

Discussion in 'General Discussion' started by hekg, Nov 4, 2015.

  1. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  2. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. hekg

    hekg Member

    Joined:
    Nov 4, 2015
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  6. CODERNATION

    CODERNATION Registered

    Joined:
    Dec 3, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    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
     
    #6 CODERNATION, Dec 3, 2015
    Last edited by a moderator: Dec 3, 2015
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
    #7 cPanelMichael, Dec 3, 2015
    Last edited by a moderator: Dec 3, 2015
Loading...

Share This Page