mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@cambridge.redhat.com>
To: aviro@redhat.com
Cc: linux-kernel@vger.kernel.org, dhowells@redhat.com
Subject: [BUG] directory renaming/removal
Date: Fri, 02 Feb 2001 13:28:28 +0000	[thread overview]
Message-ID: <4260.981120508@warthog.cambridge.redhat.com> (raw)


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/

             reply	other threads:[~2001-02-02 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-02 13:28 David Howells [this message]
2001-02-02 13:48 ` Marko Kreen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4260.981120508@warthog.cambridge.redhat.com \
    --to=dhowells@cambridge.redhat.com \
    --cc=aviro@redhat.com \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®