From owner-freebsd-security@FreeBSD.ORG Fri Jun 22 17:38:12 2012 Return-Path: Delivered-To: freebsd-security@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 192431065673 for ; Fri, 22 Jun 2012 17:38:12 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id CCC8B8FC14 for ; Fri, 22 Jun 2012 17:38:11 +0000 (UTC) Received: from ds4.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 1994D6274; Fri, 22 Jun 2012 17:38:05 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 9E596884A; Fri, 22 Jun 2012 19:38:04 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Julian H. Stacey" References: <201206221343.q5MDhmvS045187@fire.js.berklix.net> Date: Fri, 22 Jun 2012 19:38:04 +0200 In-Reply-To: <201206221343.q5MDhmvS045187@fire.js.berklix.net> (Julian H. Stacey's message of "Fri, 22 Jun 2012 15:43:47 +0200") Message-ID: <86mx3v2qo3.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-security@freebsd.org Subject: Re: / owned by bin causes sshd to complain bad ownership X-BeenThere: freebsd-security@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Security issues \[members-only posting\]" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jun 2012 17:38:12 -0000 "Julian H. Stacey" writes: > On an 8.3-RELEASE running sshd, /var/log/auth.log=20 > 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 --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no