LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 10-07-2003, 02:51 AM   #1
ymei
LQ Newbie
 
Registered: Sep 2003
Distribution: suse8.2
Posts: 7

Rep: Reputation: 0
Unhappy 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?
 
Old 10-07-2003, 03:45 PM   #2
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Root should be able to access /bin

open a shell

su
root password

cd /bin

ls -l
 
Old 10-07-2003, 04:33 PM   #3
ehdwuld
Member
 
Registered: Jul 2003
Distribution: Currently Suse 11.1 but have RH7,8,9 / Fedora 7,8_64,9_64,&10_64
Posts: 634

Rep: Reputation: 30


/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

Last edited by ehdwuld; 10-08-2003 at 12:21 AM.
 
Old 10-07-2003, 08:40 PM   #4
ymei
LQ Newbie
 
Registered: Sep 2003
Distribution: suse8.2
Posts: 7

Original Poster
Rep: Reputation: 0
root do have the privilege the access all the files in the directory /bin/
 
Old 10-08-2003, 08:14 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,953
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
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?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to get root privilege in a script jpan Linux - General 5 01-07-2005 02:46 PM
Insufficient Privilege instead of Root Password Request buckberger Linux - Security 3 12-25-2004 08:00 PM
Temp root privilege in program? ZX_SA Programming 1 07-22-2004 08:14 AM
Can't access non-server-root directories in Apache jenna_h Linux - Networking 13 10-29-2003 06:22 PM
How to get root privilege in program using c? whepin Programming 1 04-06-2002 05:27 AM


All times are GMT -5. The time now is 10:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration