LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Why root has no privilege to access some directories (https://www.linuxquestions.org/questions/linux-general-1/why-root-has-no-privilege-to-access-some-directories-101121/)

ymei 10-07-2003 02:51 AM

Why root has no privilege to access some directories
 
when I type /bin/ls -l, it says that I have no privilege to access. Then I typed"strace /bin/ls -R", it gives:
node21:/soft/intel # strace /bin/ls -R
execve("/bin/ls", ["/bin/ls", "-R"], [/* 69 vars */]) = 0
uname({sys="Linux", node="node21", ...}) = 0
brk(0) = 0x805a9ac
open("/etc/ld.so.preload", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=82827, ...}) = 0
old_mmap(NULL, 82827, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40015000
close(3) = 0
open("/lib/librt.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\300\32"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=34378, ...}) = 0
old_mmap(NULL, 72952, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4002a000
mprotect(0x40030000, 48376, PROT_NONE) = 0
old_mmap(0x40030000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5000) = 0x40030000
old_mmap(0x40031000, 44280, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40031000
close(3) = 0
open("/lib/libacl.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0000\24\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=30694, ...}) = 0
old_mmap(NULL, 24028, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x4003c000
mprotect(0x40041000, 3548, PROT_NONE) = 0
old_mmap(0x40041000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4000) = 0x40041000
close(3) = 0
open("/lib/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0pY\1\000"..., 1024) = 1024
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40042000
fstat64(3, {st_mode=S_IFREG|0755, st_size=1491599, ...}) = 0
old_mmap(NULL, 1268004, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40043000
mprotect(0x40172000, 26916, PROT_NONE) = 0
old_mmap(0x40172000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x12f000) = 0x40172000
old_mmap(0x40176000, 10532, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40176000
close(3) = 0
open("/lib/libpthread.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\320@\0"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0755, st_size=82840, ...}) = 0
old_mmap(NULL, 327300, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x40179000
mprotect(0x40186000, 274052, PROT_NONE) = 0
old_mmap(0x40186000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xd000) = 0x40186000
old_mmap(0x40187000, 269956, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40187000
close(3) = 0
open("/lib/libattr.so.1", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\r\0\000"..., 1024) = 1024
fstat64(3, {st_mode=S_IFREG|0644, st_size=14146, ...}) = 0
old_mmap(NULL, 13188, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) = 0x401c9000
mprotect(0x401cc000, 900, PROT_NONE) = 0
old_mmap(0x401cc000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x2000) = 0x401cc000
close(3) = 0
munmap(0x40015000, 82827) = 0
getrlimit(0x3, 0xbfffef1c) = 0
setrlimit(RLIMIT_STACK, {rlim_cur=2044*1024, rlim_max=RLIM_INFINITY}) = 0
getpid() = 7407
rt_sigaction(SIGRTMIN, {0x40180e10, [], SA_RESTORER, 0x4006c5c8}, NULL, 8) = 0
rt_sigaction(SIGRT_1, {0x40180e50, [], SA_RESTORER, 0x4006c5c8}, NULL, 8) = 0
rt_sigaction(SIGRT_2, {0x40180f20, [], SA_RESTORER, 0x4006c5c8}, NULL, 8) = 0
rt_sigprocmask(SIG_BLOCK, [RTMIN], NULL, 8) = 0
_sysctl({{CTL_KERN, KERN_VERSION}, 2, 0xbfffef6c, 31, (nil), 0}) = 0
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=32058672, ...}) = 0
mmap2(NULL, 2097152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x401cd000
close(3) = 0
brk(0) = 0x805a9ac
brk(0x805b9ac) = 0x805b9ac
brk(0) = 0x805b9ac
brk(0x805c000) = 0x805c000
ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TIOCGWINSZ, {ws_row=39, ws_col=142, ws_xpixel=0, ws_ypixel=0}) = 0
brk(0) = 0x805c000
brk(0x805d000) = 0x805d000
brk(0) = 0x805d000
brk(0x8060000) = 0x8060000
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0755, st_size=96, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC) = 0
brk(0) = 0x8060000
brk(0x8061000) = 0x8061000
fstat64(3, {st_mode=S_IFDIR|0755, st_size=96, ...}) = 0
getdents64(3, /* 4 entries */, 4096) = 112
lstat64("debugger", 0x805c3e4) = -1 EACCES (Permission denied)
write(2, "/bin/ls: ", 9/bin/ls: ) = 9
write(2, "debugger", 8debugger) = 8
write(2, ": Permission denied", 19: Permission denied) = 19
write(2, "\n", 1
) = 1
lstat64("fortran", 0x805c3e4) = -1 EACCES (Permission denied)
write(2, "/bin/ls: ", 9/bin/ls: ) = 9
write(2, "fortran", 7fortran) = 7
write(2, ": Permission denied", 19: Permission denied) = 19
write(2, "\n", 1
) = 1
getdents64(3, /* 0 entries */, 4096) = 0
close(3) = 0
fstat64(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40015000
write(1, ".:\n", 3.:
) = 3
munmap(0x40015000, 4096) = 0
exit_group(1) = ?

Could anyone give me a help?

Skyline 10-07-2003 03:45 PM

Root should be able to access /bin

open a shell

su
root password

cd /bin

ls -l

ehdwuld 10-07-2003 04:33 PM



/bin/
then ls -l

you are trying to do it in one step and it should be two
Quote:

when I type /bin/ls -l, it says that I have no privilege to access. Then I typed"strace /bin/ls -R", it gives:
node21:/soft/intel # strace /bin/ls -R
execve("/bin/ls", ["/bin/ls", "-R"], [/* 69 vars */]) = 0

ymei 10-07-2003 08:40 PM

root do have the privilege the access all the files in the directory /bin/

unSpawn 10-08-2003 08:14 AM

Maybe you should give a bit more nfo.
What's the distribution? Release? Any kernel mods that would obstruct viewing stuff like LIDS, Grsecurity or other ACL's?

What's the output of running "stat" on "/soft"? On "/soft/intel"? On the contents of "/soft/intel"? Is this the only dir/are debugger/fortran the only files you got probs with?

Any other anomalies you'd like to report that may or may not be/seem related to this situation?


All times are GMT -5. The time now is 12:05 AM.