Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Running service sshd restart and then service sshd status on my system as root prints the following error:

Redirecting to /bin/systemctl status sshd.service sshd.service - OpenSSH server daemon Loaded: loaded (/usr/lib/systemd/system/sshd.service; enabled) Active: failed (Result: exit-code) since Sat, 16 Feb 2013 21:38:38 +0330; 6s ago
Process: 2207 ExecStart=/usr/sbin/sshd -D $OPTIONS (code=exited, status=255) Process: 2204 ExecStartPre=/usr/sbin/sshd-keygen (code=exited, status=0/SUCCESS) CGroup: name=systemd:/system/sshd.service

Feb 16 21:38:38 localhost.localdomain sshd[2207]: /var/empty/sshd must be own...

How do I find the cause of the problem?

share|improve this question
3  
The last (truncated!) line of the error message presumably talks about ownership of /var/empty/sshd, here (Fedora 18) I have drwx--x--x. 2 root root 4096 Feb 8 11:18 /var/empty/sshd/, that directory is owned by package openssh-server (perhaps reinstall that one?). –  vonbrand Feb 16 '13 at 18:20
    
Reinstalling openssh-server solved the problem. Thanks. If you want, add it as answer so I can accept it. –  Omid Feb 16 '13 at 18:46
add comment

1 Answer

up vote 3 down vote accepted

The last (truncated!) line of the error message presumably talks about ownership of /var/empty/sshd, here (Fedora 18) ls -ld gives:

drwx--x--x. 2 root root 4096 Feb 8 11:18 /var/empty/sshd/

Running rpm -qf /var/empty/sshd gives:

openssh-server-6.1p1-5.fc18.x86_64

So that directory is owned by package openssh-server (perhaps reinstall that one?)

share|improve this answer
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.