All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] directory renaming/removal
@ 2001-02-02 13:28 David Howells
  2001-02-02 13:48 ` Marko Kreen
  0 siblings, 1 reply; 2+ messages in thread
From: David Howells @ 2001-02-02 13:28 UTC (permalink / raw)
  To: aviro; +Cc: linux-kernel, dhowells


Run the following script (It's been tried on linux-2.2.x and linux-2.4.x):

#!/bin/sh
cd /tmp
mkdir x
cd x
mkdir x y z
strace -etrace=rename,mkdir,rmdir,chmod mv x z
echo ---------
chmod -w y
strace -etrace=rename,mkdir,rmdir,chmod mv y z

The output:

rename("x", "z/x")                      = 0
---------
rename("y", "z/y")                      = -1 EACCES (Permission denied)
mkdir("z/y", 040755)                    = 0
chmod("z/y", 040555)                    = 0
rmdir("y")                              = 0

You'll notice the following:

 (1) Linux can't rename directories that are marked as read-only. This is
     strange because the directories actually being modified _do_ have write
     permission.

 (2) You can _remove_ a read-only directory.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-02-02 13:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-02-02 13:28 [BUG] directory renaming/removal David Howells
2001-02-02 13:48 ` Marko Kreen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.