I am trying to send commands to a screen session owned by a different user.
screen -x someuser/sometask -X somecommand
That always results in:
Cannot opendir /var/run/screen/S-someuser: Permission denied
The weird part about this is that i can use
screen -x someuser/sometask and type in
somecommand by hand. When I try running as root, I get
No screen session found.
screen is setuid root, as it is required for multiuser access.
I tried to change the permissions of
screen/S-someuser but screen doesn't allow that:
Directory /var/run/screen/S-someuser must have mode 700.
I have tried finding an answer to this. I found a few similar questions but none of them had a solution. Is this a bug in screen or am I just doing it wrong?