Is there a way I can open a new 'screen' session on my RHEL box as a non-root user? When I try to open a new screen using the 'screen' command as a non-root user, it fails and I get the following message:
Cannot open your terminal '/dev/pts/2' - please check.
I researched a little bit and found people suggesting to change the permissions on /dev/pts to grant the non-root user (who is trying to open the screen) a read/write access. Though it may work, it does not look like a neat solution. Is there a 'legal' way that allows a non-root user to open a screen session?
Edited : I have this issue on my RHEL 5.5, 6.2 and 6.5 machines. The screen version on all these boxes are 'Screen version 4.00.03 (FAU) 23-Oct-06'.
P.S:- I know that I can open a screen session as root and 'su' to start my command/process, but that is not what I am looking for.
Best Answer
This is a known problem, if you ssh as root somewhere and then
su
to become a normal user:It is e.g. described in these posts from 2005
The solution is to directly login as the user you want the
screen
session to run as.