/ owned by bin causes sshd to complain bad ownership

Dag-Erling Smørgrav des at des.no
Fri Jun 22 17:38:12 UTC 2012


"Julian H. Stacey" <jhs at berklix.com> writes:
> On an 8.3-RELEASE running sshd, /var/log/auth.log 
> 	Jun 22 12:54:06 lapr sshd[57505]: Authentication refused:
> 		bad ownership or modes for directory /

sshd requires that the user's authorized_keys, the directory it's in
(~/.ssh) and all its ancestor directories be owned by either the user or
root.

> Until I did
> 	chown 0:0 /
> ( It was previously
> 	drwxr-xr-x  25 bin   bin       1024 Jun 20 19:53 ./
> )

I don't see why / should be owned by bin; bin is intended for system
binaries and libraries, i.e. {,/usr}/{bin,sbin,lib,libexec}, except
those that need to be setuid or setgid.  The directories themselves
should probably still be owned by root:wheel.

DES
-- 
Dag-Erling Smørgrav - des at des.no


More information about the freebsd-security mailing list