problems with lstat(), kernel 2.4.0-test2-pre11, and reiserfs 3.6.9

From: David Ford (david@kalifornia.com)
Date: Fri Jun 23 2000 - 20:18:09 EST


came across a problem today.

While doing a cvs co of X, I was watching the disk usage and strangly
I started getting permission denied. I'm doing these operations as
root with no limits or capsets.

Here's an strace:

6420 execve("/bin/ls", ["ls", "-la"], [/* 45 vars */]) = 0
6420 brk(0) = 0x80509cc
6420 open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or
directory)
6420 open("/etc/ld.so.cache", O_RDONLY) = 4
6420 fstat(4, {st_mode=S_IFREG|0644, st_size=34535, ...}) = 0
6420 old_mmap(NULL, 34535, PROT_READ, MAP_PRIVATE, 4, 0) = 0x40014000
6420 close(4) = 0
6420 open("/lib/libc.so.6", O_RDONLY) = 4
6420 fstat(4, {st_mode=S_IFREG|0755, st_size=4056015, ...}) = 0
6420 read(4,
"\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\4\220\1"..., 4096) =
4096
6420 old_mmap(NULL, 917628, PROT_READ|PROT_EXEC, MAP_PRIVATE, 4, 0) =
0x4001d000
6420 mprotect(0x400f6000, 28796, PROT_NONE) = 0
6420 old_mmap(0x400f6000, 16384, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED, 4, 0xd8000) = 0x400f6000
6420 old_mmap(0x400fa000, 12412, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400fa000
6420 close(4) = 0
6420 munmap(0x40014000, 34535) = 0
6420 personality(PER_LINUX) = 0
6420 getpid() = 6420
6420 brk(0) = 0x80509cc
6420 brk(0x8050a04) = 0x8050a04
6420 brk(0x8051000) = 0x8051000
6420 time(NULL) = 961808549
6420 ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
6420 ioctl(1, TIOCGWINSZ, {ws_row=24, ws_col=80, ws_xpixel=0,
ws_ypixel=0}) = 0
6420 brk(0x8054000) = 0x8054000
6420 open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR
(Not a directory)
6420 open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = 4
6420 fstat(4, {st_mode=S_IFDIR|0755, st_size=128, ...}) = 0
6420 fcntl(4, F_SETFD, FD_CLOEXEC) = 0
6420 brk(0x8056000) = 0x8056000
6420 getdents(4, /* 5 entries */, 3933) = 88
6420 lstat(".", {st_mode=S_IFDIR|0755, st_size=128, ...}) = 0
6420 lstat("..", {st_mode=S_IFDIR|0755, st_size=96, ...}) = 0
6420 lstat("Repository", 0xbffff59c) = -1 EACCES (Permission denied)
6420 write(2, "ls: ", 4) = 4
6420 write(2, "Repository", 10) = 10
6420 write(2, ": Permission denied", 19) = 19
6420 write(2, "\n", 1) = 1
6420 lstat("Root", 0xbffff5a4) = -1 EACCES (Permission denied)
6420 write(2, "ls: ", 4) = 4
6420 write(2, "Root", 4) = 4
6420 write(2, ": Permission denied", 19) = 19
6420 write(2, "\n", 1) = 1
6420 lstat("Entries", 0xbffff59c) = -1 EACCES (Permission denied)
6420 write(2, "ls: ", 4) = 4
6420 write(2, "Entries", 7) = 7
6420 write(2, ": Permission denied", 19) = 19
6420 write(2, "\n", 1) = 1
6420 getdents(4, /* 0 entries */, 3933) = 0
6420 close(4) = 0

Hmmmmm, ok. Ideas?

Getting the dents here is the only thing that works.

# ls -la
ls: Repository: Permission denied
ls: Root: Permission denied
ls: Entries: Permission denied
total 2
drwxr-xr-x 2 root root 128 Jun 23 17:57 ./
drwxr-xr-x 3 root root 96 Jun 23 17:57 ../

-d

--
"The difference between 'involvement' and 'commitment' is like an
eggs-and-ham breakfast: the chicken was 'involved' - the pig was
'committed'."


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



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:27 EST