jailkit-users
[Top][All Lists]
Advanced

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

Re: [Jailkit-users] problems running commands, differing ldd output


From: Olivier Sessink
Subject: Re: [Jailkit-users] problems running commands, differing ldd output
Date: Mon, 28 Apr 2014 20:30:36 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

On 04/27/2014 08:51 PM, Tzvi Edelman wrote:
> Hi Rich, thanks for taking a whack at this.
>
> Running `which grep` does return "/bin/grep".
>
> Here is my PATH:
>   PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
>
> Running `ls -l /bin/grep` returns
>   -rwxr-xr-x 1 root root 149536 May 27  2012 /bin/grep
>
> I'm really curious why the execve fails with ENOENT. 
>
> # strace from the bash session in which I invoked grep
> /tmp/trace-20140426-213214.15117:write(2, "\10\10\10\10\10\10grep
> qtest /etc/passwd ", 29) = 29
>
> # strace from the process attempting to launch grep (filtered for "grep")
> /tmp/trace-20140426-213214.15274:execve("/bin/grep", ["grep", "qtest",
> "/etc/passwd"], [/* 7 vars */]) = -1 ENOENT (No such file or directory)
> /tmp/trace-20140426-213214.15274:stat64("/bin/grep",
> {st_mode=S_IFREG|0755, st_size=149536, ...}) = 0
> /tmp/trace-20140426-213214.15274:stat64("/bin/grep",
> {st_mode=S_IFREG|0755, st_size=149536, ...}) = 0
> /tmp/trace-20140426-213214.15274:stat64("/bin/grep",
> {st_mode=S_IFREG|0755, st_size=149536, ...}) = 0
> /tmp/trace-20140426-213214.15274:access("/bin/grep", X_OK)            
>   = 0
> /tmp/trace-20140426-213214.15274:stat64("/bin/grep",
> {st_mode=S_IFREG|0755, st_size=149536, ...}) = 0
> /tmp/trace-20140426-213214.15274:access("/bin/grep", R_OK)            
>   = 0
> /tmp/trace-20140426-213214.15274:open("/bin/grep",
> O_RDONLY|O_LARGEFILE) = 3
> /tmp/trace-20140426-213214.15274:write(2, "bash: /bin/grep: No such
> file or"..., 43) = 43
>
> Do any of you any ideas about execve failure?

just guessing:

could it be a permissions problem on the executable or any of it's
libraries?

Or perhaps there is a 'noexec' mount option used somewhere where the
binary is located?

Olivier


-- 
Bluefish website http://bluefish.openoffice.nl/
Blog http://oli4444.wordpress.com/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]