From owner-freebsd-questions@FreeBSD.ORG Wed Mar 24 11:40:06 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15EB3106566C for ; Wed, 24 Mar 2010 11:40:06 +0000 (UTC) (envelope-from dan@slightlystrange.org) Received: from catflap.slightlystrange.org (cpc2-cmbg1-0-0-cust385.cmbg.cable.ntl.com [82.21.105.130]) by mx1.freebsd.org (Postfix) with ESMTP id C763C8FC15 for ; Wed, 24 Mar 2010 11:40:05 +0000 (UTC) Received: from dan by catflap.slightlystrange.org with local (Exim 4.71 (FreeBSD)) (envelope-from ) id 1NuOwO-0001UT-Nr for freebsd-questions@freebsd.org; Wed, 24 Mar 2010 11:40:04 +0000 Date: Wed, 24 Mar 2010 11:40:04 +0000 From: Daniel Bye To: FreeBSD Questions Message-ID: <20100324114004.GA2585@catflap.slightlystrange.org> Mail-Followup-To: FreeBSD Questions References: <4BA95CF5.7090401@comclark.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4BA95CF5.7090401@comclark.com> User-Agent: Mutt/1.4.2.3i X-PGP-Fingerprint: D349 B109 0EB8 2554 4D75 B79A 8B17 F97C 1622 166A X-Operating-System: FreeBSD 8.0-STABLE amd64 Sender: Daniel Bye Subject: Re: delete directory X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Daniel Bye List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Mar 2010 11:40:06 -0000 On Wed, Mar 24, 2010 at 08:29:41AM +0800, Aiza wrote: > This directory named empty has read/exec permissions. > How do I delete it? > > # /usr/jails/newjail/var >ls -l > total 2 > dr-xr-xr-x 2 root wheel 512 Nov 21 22:53 empty > # /usr/jails/newjail/var >cd empty > # /usr/jails/newjail/var/empty >ls -l > total 0 > # /usr/jails/newjail/var/empty >cd .. > # /usr/jails/newjail/var >rmdir empty > rmdir: empty: Operation not permitted > # /usr/jails/newjail/var >rm -rf empty > rm: empty: Operation not permitted > # /usr/jails/newjail/var >chmod 777 empty > chmod: empty: Operation not permitted I'd suggest you don't remove it - from sshd(8): /var/empty chroot(2) directory used by sshd during privilege separation in the pre-authentication phase. The directory should not contain any files and must be owned by root and not group or world- writable. If you intend to run sshd in your jail, you'd be better off leaving it. Dan -- Daniel Bye _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \