Playing around with rmdir

Benny Amorsen (amorsen@sscnet.com)
19 Sep 1997 21:03:25 +0200


In kernel 2.1.55, ext2 file system:

vega.sscnet.com: ~> mkdir tst
vega.sscnet.com: ~> cd tst
vega.sscnet.com: ~/tst> rmdir .
vega.sscnet.com: ~/tst> touch test
touch: test: Operation not permitted
vega.sscnet.com: ~/tst> strace touch test
[snip]
stat(ptrace: umoven: I/O error
0xbffffc1f, 0xbffffa84) = -1 ENOENT (No such file or
directory)
creat(ptrace: umoven: I/O error
0xbffffc1f, 0666) = -1 EPERM (Operation not permitted)
[snip]
vega.sscnet.com: ~/tst>

Returning EPERM seems a bit surprising. I would prefer ENOENT.

It happens whether or not I am logged in as root.

Benny