Used recursive chown on the root directory

5,050

/var/run/sshd must be owned by root and not group or world-writable.

This should be fixable by:

$ chown root /var/run/sshd
$ chmod 744 /var/run/sshd

I'd guess that you're going to run into a plethora of other permissions errors after correcting this one, but that should at least get you started.

Edit

Since you're on linode, you have several other options to restore your data, all of which will probably be easier than trying to massage your sshd into working order. I'm a long-time linode customer and have had to do this a couple of times...

First option, and possibly easiest, temporarily upgrade to a larger plan or purchase additional disk space. Then you can deploy a new, clean linux install into the extra space and then mount your broken volume from within the good install. Get all of your data transferred into the new install, delete the old image, and downsize back to whatever size server you had previously.

Second option, you can use the included Finnix rescue distribution to mount your system and then transfer the entire disk image to your local workstation, where you'll be able to get the data off.

Share:
5,050

Related videos on Youtube

Admin
Author by

Admin

Updated on September 18, 2022

Comments

  • Admin
    Admin almost 2 years

    Im gonna need some help restoring my ssh settings as i screwed everything up by calling this command:

    chown -R user /
    

    At the moment im not able to access the site through ssh/ftp since the ownership of all the files have been changed. I dont want to reset every ownership but if i could get ssh working i would be able to create a backup of my files and then get a clean install of ubuntu on my server.

    Here is the error that i get when im trying to restart ssh:

    /var/run/sshd must be owned by root and not group or world-writable.
    

    Im running ubuntu 10.04 LTS. Any help is very much appreciated.

    P.S. I am able to run ssh commands on a browser based AJAX console that my hosting company (linode) provides.

    Thanks

  • reikyoushin
    reikyoushin almost 14 years
    Thank yo very much. I had already corrected the permission for mysql and now the website is working fine. SSH is also responding well. Thanks again.
  • EEAA
    EEAA almost 14 years
    I'm glad to hear that it's working. You're surely going to want to re-install though, as you'll never really be able to predict what issues the bad permissions might have in the future. The steps I outlined above should help you in your reinstall process.