r/gnu • • Jan 04 '23
GNU screen 4.9.0 on RHEL9.1 = operation not permitted
Hi,
I compiled screen 4.9.0 on RHEL 9.1 today. It runs as root without a hitch. However an unprividleged user gives this error message:
-bash: /usr/local/bin/screen: Operation not permitted.
The binary has setuid group set with a group name of screen.
I did a "restorecon -FvR /usr/local" for good measure, but I did not see an fcontext entry for /usr/local/bin but it has system_u:object_r:bin_t on it.
Any ideas what I could try next?
11
Upvotes
1
u/clarince63 Jan 05 '23
Since it runs as root I'd say that screen is trying to access something that it can't as a non-root user. Could you run strace screen and post the results? I think this will give us a clue what that might do. A quick, dirty, and insecure way of fix it though is to set the suid bit on the screen binary.
1
u/Lellow_Yedbetter Jan 05 '23
Do you have fapolicyd running?
If so make sure that your user is allowed to run
/usr/loca/bin/screen1
u/o11c Jan 06 '23
Running
setuidis not what you want. You're opening a security hole for no reason.Even if you need some kind of privileges (most users of screen certainly do not!), you should specify them at a much finer level.