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!

Permissions of /etc directory messed up

Discussion in 'General Discussion' started by avergara08, Dec 6, 2012.

  1. avergara08

    avergara08 Registered

    Joined:
    Dec 6, 2012
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    TL;DR - How can I restore the original file and folder permissions of /etc

    -------------------------------------------------------------------------------------

    I was trying to create a separate ssh account for another coder so that he will not be able to access everything if I give him the root account.

    While I was testing the newly created account, i discovered he can access /etc folder and I was like "no".

    Without any sane thinking, i immediately ran
    Code:
    chmod o-r -R
    and
    Code:
    chmod g-r -R
    :eek:

    This apparently caused a lot of errors (ssh, website access, cpanel access, git, etc), and I was so f*cked up.

    To make things worse, I panicked and ran
    Code:
    chmod o+r -R
    and
    Code:
    chmod g+r -R
    hoping to make things better :( (god i am so @!#!, sorry guys)

    I managed to fix a few things, such as ssh, git, and our websites run properly now.. But I am now having problems with drush - outputting a "segmentation fault" error. This was not happening before.

    I am sure there are alot of other things unknown to me that are probably having problems as well. So I think the best way is to restore the original file and folder permissions of /etc . Is there a way to do this?

    :(
     
  2. cPanelJared

    cPanelJared Technical Analyst

    Joined:
    Feb 25, 2010
    Messages:
    1,835
    Likes Received:
    20
    Trophy Points:
    143
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The only things you can really do are compare the permissions of files and directories in /etc on a known-working server, or run a bash loop command to use rpm -V to verify every package that is installed on the server, and reinstall every package that has discrepancies on its files in /etc. The latter will not necessarily get everything, though, since some files in /etc are not owned by any package.
     
    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