Re: Bug#644788: Bug#654116: RFH: screen -- terminal multiplexor with VT100/ANSI terminal emulation
Axel Beckert <firstname.lastname@example.org> writes:
> And I can't really execute it, neither as the user owning the screen
> session nor as root:
> ~ # /proc/32039/exe -ls
> zsh: permission denied: /proc/32039/exe
Yes, /proc is mounted noexec so you need to use the ld-linux.so trick.
But now that I actually try it, I realize that it makes screen lose its
setgid bit, so it doesn't actually work in this context:
root@silenus:~# screen -ls
There is a screen on:
12255.pts-17.silenus (01/03/2012 07:44:49 PM) (Detached)
1 Socket in /var/run/screen/S-root.
root@silenus:~# rm /usr/bin/screen
root@silenus:~# file -L /proc/12255/exe
/proc/12255/exe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, BuildID[sha1]=0xc95e778d3362448aa7bfe3191f007d225652dc0a, stripped
root@silenus:~# /proc/12255/exe -ls
-su: /proc/12255/exe: Permission denied
root@silenus:~# /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 /proc/12255/exe -ls
Directory '/var/run/screen' must have mode 777.
Sorry for the false alarm. :)
Romain Francoise <email@example.com>