From owner-freebsd-questions Mon Nov 4 8:32:46 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B726F37B401 for ; Mon, 4 Nov 2002 08:32:44 -0800 (PST) Received: from mail-relay1.mirrorimage.net (mail-relay1.mirrorimage.net [209.58.140.11]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA63D43E3B for ; Mon, 4 Nov 2002 08:32:43 -0800 (PST) (envelope-from leblanc@mirror-image.net) Received: from leblanc.mirrorimage.net (leblanc.mirrorimage.net [209.192.210.146]) by mail-relay1.mirrorimage.net (8.9.3/8.9.3) with ESMTP id LAA09201 for ; Mon, 4 Nov 2002 11:32:38 -0500 Received: from leblanc.mirrorimage.net (localhost [127.0.0.1]) by leblanc.mirrorimage.net (8.12.3/8.11.4) with ESMTP id gA4GWbmj071213 for ; Mon, 4 Nov 2002 11:32:37 -0500 (EST) (envelope-from leblanc@leblanc.mirrorimage.net) Received: (from leblanc@localhost) by leblanc.mirrorimage.net (8.12.3/8.12.3/Submit) id gA4GWbYQ071212 for freebsd-questions@FreeBSD.org; Mon, 4 Nov 2002 11:32:37 -0500 (EST) Date: Mon, 4 Nov 2002 11:32:37 -0500 From: Louis LeBlanc To: freebsd-questions@FreeBSD.org Subject: Re: Re: non-writeable directory - can't be removed Message-ID: <20021104163237.GA71194@keyslapper.org> Reply-To: freebsd-questions@FreeBSD.org Mail-Followup-To: freebsd-questions@FreeBSD.org References: <20021104145702.GB46132@keyslapper.org> <20021104145939.GA75425@arpa.com> <20021104150624.GC46132@keyslapper.org> <20021104151853.GA8703@student.uu.se> Mime-Version: 1.0 Content-Type: text/plain; charset=unknown-8bit Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20021104151853.GA8703@student.uu.se> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 11/04/02 04:18 PM, Erik Trulsson sat at the `puter and typed: > On Mon, Nov 04, 2002 at 10:06:25AM -0500, Louis LeBlanc wrote: > > On 11/04/02 08:59 AM, Chip Norkus sat at the `puter and typed: > > > On Mon Nov 04, 2002; 09:57AM -0500 Louis LeBlanc propagated the following: > > > > Hey all. I'm trying to get some temp files cleaned out, and the one > > > > giving me trouble is /tmp/temproot/var/empty/ > > > > > > > > The empty directory is in fact empty, but the ownership and > > > > permissions seem to make it impossible to remove it. I've tried rm > > > > -rf, rm -df, and rmdir all as root, but all I get is: > > > > # rm -df empty/ > > > > rm: empty/: Operation not permitted > > > > > > > > > > Try 'chflags noschg /tmp/temproot/var/empty' and then try removing it > > > again. > > > > > > Cool. That did the trick, but why would a directory be set > > unwriteable *and* immutable? Like I said before, it seems it would > > make the directory useless. > > Not quite. I think /var/empty is used for sshd to chroot into. This means > that it needs to exist, but can be empty, and indeed *should* be empty to > minimize security risks. > That directory is unwriteable and immutable to make sure that it not only > is empty but *stays* empty. Otherwise some unsuspecting sysadmin might > remove it thinking it is unimportant, but this way said sysadmin will > realize that there is *something* special about the directory. > The directory in /tmp/temproot sounds like remains from a mergemaster run > that didn't finish normally. (Since mergemaster normally cleans up after > itself.) Ok, that makes perfect sense now. Thanks a bunch. Lou -- Louis LeBlanc leblanc@keyslapper.org Fully Funded Hobbyist, KeySlapper Extrordinaire :) http://www.keyslapper.org ԿԬ If an experiment works, something has gone wrong. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message