1 |
On Tuesday 19 June 2007 12:27:10 Jan-Hendrik Zab wrote: |
2 |
> 'strace -f su - jonsnow': |
3 |
> |
4 |
> [pid 4117] execve("/bin/zsh", ["-su"], [/* 6 vars */]) = |
5 |
> -1 EACCES (Permission denied) |
6 |
|
7 |
Note that the trace clearly shows that /bin/zsh isn't returning an error code |
8 |
(in which case pid 4117 would immediately die) but rather the execve call is |
9 |
returning an error code and the fork()ed copy of su continues executing |
10 |
(writes an error to stderr and then dies). |
11 |
|
12 |
According to http://www.die.net/doc/linux/man/man2/execve.2.html EACCES is |
13 |
only returned by this function for a few reasons: |
14 |
|
15 |
1) Search permission is denied on a component of the path prefix of filename |
16 |
or the name of a script interpreter. (See also path_resolution(2).) |
17 |
|
18 |
(So, make sure /bin and / are executable by uid 1000.) |
19 |
|
20 |
2) The file or a script interpreter is not a regular file. |
21 |
|
22 |
(So, make sure /bin/zsh is not a symlink, evidently that doesn't work.) |
23 |
|
24 |
3) Execute permission is denied for the file or a script or ELF interpreter. |
25 |
|
26 |
(So, make sure that /bin/zsh and /lib/ld-linux.so* are executable. |
27 |
If /bin/zsh is a script make sure the interpreter listed after #! is |
28 |
executable. Proceed recursively if THAT is a script.) |
29 |
|
30 |
(Also, is it possible that you don't have the right /lib/ld-linux.so? See the |
31 |
above link for some detail [the paragraph just above RETURN VALUE]. ldd |
32 |
should be able to show you which one you need.) |
33 |
|
34 |
4) The file system is mounted noexec. |
35 |
|
36 |
(So, make sure that you filesystem is currently mounted exec.) |
37 |
|
38 |
If all of those check out, I think you'll have to "use the source, luke". |
39 |
|
40 |
> Permissions of '/': |
41 |
> |
42 |
> drwxr-xr-x 20 root root 4096 2007-06-17 16:21 // |
43 |
|
44 |
That looks a little weird, but only because of the extra '/'. |
45 |
|
46 |
On my system: |
47 |
$ ls -ld / |
48 |
drwxr-xr-x 23 root root 664 2007-06-11 20:27 / |
49 |
|
50 |
-- |
51 |
Boyd Stephen Smith Jr. ,= ,-_-. =. |
52 |
bss03@××××××××××.net ((_/)o o(\_)) |
53 |
ICQ: 514984 YM/AIM: DaTwinkDaddy `-'(. .)`-' |
54 |
http://iguanasuicide.org/ \_/ |