xfs
[Top] [All Lists]

Re: Interesting XFS Behavior

To: Jeff Breitner <memptr@xxxxxxxxxxx>
Subject: Re: Interesting XFS Behavior
From: Timothy Shimmin <tes@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 Nov 2001 15:37:40 +1100
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <01110610360706.01823@office3>; from memptr@gatecom.com on Tue, Nov 06, 2001 at 10:36:07AM -0500
References: <20011105225039.A599@asterix.gallien.de> <1005058628.15251.15.camel@jen.americas.sgi.com> <01110610360706.01823@office3>
Sender: owner-linux-xfs@xxxxxxxxxxx
Hi Jeff,

On Tue, Nov 06, 2001 at 10:36:07AM -0500, Jeff Breitner wrote:
> 
> I have been goofing around trying to mimic the chattr -/+i features of ext2.  
> I figured out that I can keep directories from being deleted if I copy 
> /dev/null into a hidden file, say .donotdelete and then chmod 000 
> .donotdelete.
> 
> This keeps users from killing off the directory as they are greeted with a 
> "permission denied" if they try an rm -r <dirname> or rmdir.
> 
> However, what's interesting is that after the user attempts this, the null 
> file ".donotdelete" disappears.  Where does it go?  And even though it's 
> gone, further attempts at removal are still met with "permission denied".
> As user root, the file can't be listed nor deleted by name -- it just 
> vanishes although something thinks it is there because only root can kill the 
> directory containing the null file.
> 
> This is the behavior on my Irix 6.2 box as well (a feather in the cap of 
> consistency).
> 
> Any ideas what's going on?  
> 
I can't make this happen on 6.2 or linux.
I must not be doing what you're doing.
What were the exact steps ?

mkdir testdir
cd testdir
cp /dev/null .donotdelete (or use dd or touch)
chmod 000 .donotdelete
cd ..
rm -r ./testdir

--Tim


<Prev in Thread] Current Thread [Next in Thread>