Date: Sun, 18 May 2003 12:14:19 +0100 From: Jez Hancock <jez.hancock@munk.nu> To: FreeBSD Questions <FreeBSD-questions@FreeBSD.org> Subject: Re: problem removing directory Message-ID: <20030518111419.GA99297@users.munk.nu> In-Reply-To: <20030518110213.GA88040@dds.nl> References: <20030518110213.GA88040@dds.nl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, May 18, 2003 at 01:02:13PM +0200, Alex de Kruijff wrote: > Hi, > > I wanted to move /var/tmp to /tmp and symlink it for security reasons. > I move /var/tmp to /var/tmp-old and copied the files to /tmp and them > symlink /var/tmp to /tmp. So far so good. > > However, now i am unable to remove one directory and need some help in > removing this. > > Intranet# ll > total 1 > dr-xr-xr-x 2 root wheel 512 Mar 16 22:04 empty/ > Intranet# pwd > /var/tmp-old/temproot/var > Intranet# ll > total 1 > dr-xr-xr-x 2 root wheel 512 Mar 16 22:04 empty/ > Intranet# rm -rf * Try: chflags -R noschg * in /var/tmp/ Presumably you ran mergemaster at some point which creates the /var/tmp/temproot hierarchy and sets some system 'immutable' flags on some of the files in there to stop them being modified. Running 'chflags noschg' removes the immutable flag. For more info, man chflags and man ls Specifically try ls -loR /var/tmp/ For example on my system: [12:13:19] munk@users /home/munk# ls -lo /kernel -r-xr-xr-x 1 root wheel schg 3132649 Apr 18 14:42 /kernel you can see the 'schg' flag is set on kernel to stop it being modified. Jez
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030518111419.GA99297>