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

    Dec 6, 2012
    Likes Received:
    Trophy Points:
    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
    chmod o-r -R
    chmod g-r -R

    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
    chmod o+r -R
    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

    Feb 25, 2010
    Likes Received:
    Trophy Points:
    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...

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