Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question

migrated from stackoverflow.com Aug 24 '10 at 2:27

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

add comment

2 Answers 2

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
add comment

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:

util-linux
sshd
share|improve this answer
add comment

Your Answer

 
discard

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