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.

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
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    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.
     
Loading...

Share This Page