1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Permissions Reset on container

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by srzx2j, Jul 31, 2012.

  1. srzx2j

    srzx2j Guest

    0
     
    I've been managing my VPS for a few months now and learning linux.

    I needed to make a change to a website directory but ended up reseting permissions accidently on my entire containter to 777.

    I cannot SSH in because the connection is refused. When I go look in the System Services, the service is not running. When I try to start the service I receive the following error:
    Failed to start the "sshd" service.
    Cannot start/stop/restart service: Starting sshd: /var/empty/sshd must be owned by root and not group or world-writable.

    Can someone point me in the right direction so that I can reset permissions to default or at the very least regain access to my SSH?

    Thanks!
     
  2. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
    Since you have access to Plesk -> go to Tools & Settings -> Schedule Tasks -> Root -> create a task that runs say every 1 - 10 minutes with the command:

    chown -R root:root /etc/ssh
    /etc/init.d/sshd restart

    That should turn the ownership of SSH back to the root user ...
     
  3. srzx2j

    srzx2j Guest

    0
     
    That is genius!

    I'll give that a try and report back.


    Thanks!
     
  4. srzx2j

    srzx2j Guest

    0
     
    Okay that worked... I had to also do a chmod 700 /var/empty/sshd in order for the changes to take effect. THANK YOU!!!


    Now can someone point me in the right direction to reset all the permissions to default? At the moment everything is 777.

    I should add that what led to this problem was that I did a chmod * 777... Everything is effected minus what I just changed thanks to the help of abdi.

    Thanks!

    EDIT: Well, I've double checked and had a backup of everything. Compared it to what was on the container and reinstalling from scratch. I'm sure there is another way, but I wouldn't be able to sleep knowing that my system is completely exposed.
     
    Last edited by a moderator: Jul 31, 2012
  5. abdi

    abdi Platinum Pleskian

    31
    18%
    Joined:
    May 14, 2006
    Messages:
    2,913
    Likes Received:
    60
Loading...