Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm going to 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.

I'm running ubuntu 10.04 LTS. Any help is very much appreciated.

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

share|improve this question

migrated from Aug 24 '10 at 2:27

This question came from our site for professional and enthusiast programmers.

You could just use chown again to make /var/run/ssh owned by the root. And I don't know much about Ubuntu, but couldn't you right click on the file in Nautilis (or whatever the file manager is called), and choose some option to change the permissions? Pablo Santa Cruz is right thought: this belongs on one of the sites he mentioned.

share|improve this answer

There are a number of tools which are used by ssh which have setuid permissions set, such as login which will also be effected by this issue. Depending on your system the best way to recover is to reinstall the packages:

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.