On Tuesday 19 June 2007 12:27:10 Jan-Hendrik Zab wrote:
> 'strace -f su - jonsnow':
>
> [pid  4117] execve("/bin/zsh", ["-su"], [/* 6 vars */]) =
> -1 EACCES (Permission denied) 

Note that the trace clearly shows that /bin/zsh isn't returning an error code 
(in which case pid 4117 would immediately die) but rather the execve call is 
returning an error code and the fork()ed copy of su continues executing 
(writes an error to stderr and then dies).

According to http://www.die.net/doc/linux/man/man2/execve.2.html EACCES is 
only returned by this function for a few reasons:

1) Search permission is denied on a component of the path prefix of filename 
or the name of a script interpreter. (See also path_resolution(2).)

(So, make sure /bin and / are executable by uid 1000.)

2) The file or a script interpreter is not a regular file. 

(So, make sure /bin/zsh is not a symlink, evidently that doesn't work.)

3) Execute permission is denied for the file or a script or ELF interpreter.

(So, make sure that /bin/zsh and /lib/ld-linux.so* are executable.  
If /bin/zsh is a script make sure the interpreter listed after #! is 
executable.  Proceed recursively if THAT is a script.)

(Also, is it possible that you don't have the right /lib/ld-linux.so?  See the 
above link for some detail [the paragraph just above RETURN VALUE].  ldd 
should be able to show you which one you need.)

4) The file system is mounted noexec.

(So, make sure that you filesystem is currently mounted exec.)

If all of those check out, I think you'll have to "use the source, luke".

> Permissions of '/':
>
>       drwxr-xr-x 20 root root 4096 2007-06-17 16:21 //

That looks a little weird, but only because of the extra '/'.

On my system:
$ ls -ld /
drwxr-xr-x 23 root root 664 2007-06-11 20:27 /

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
[EMAIL PROTECTED]                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to