[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: su: Permission denied, (Ignored)



martin f krafft wrote:
I have just encountered a weird message by /bin/su:

master:/tmp# su -c id collector su: Permission denied
(Ignored)
uid=200(collector) gid=200(collector) groups=200(collector)

root su's to the collector user (pam_rootok allows this), and the
command is executed. But where do the messages come from.

strace says:

[...]
stat64("/root", {st_mode=S_IFDIR|0700, st_size=116, ...}) = 0
stat64(".", 0xbffffa00)                 = -1 EACCES (Permission denied)
brk(0)                                  = 0x80ec000
brk(0x80ee000)                          = 0x80ee000
getcwd("/root", 4096)                   = 6
getpid()                                = 15728
getppid()                               = 15727
stat64(".", 0xbffffa30)                 = -1 EACCES (Permission denied)
<snip>
The failing call seems to be a stat of the CWD, which is /tmp,
<snip>

The cwd here is /root (though I don't see why) and collector presumably doesn't have execute permission on /root so it can't even look up ".".

Ben.



Reply to: