Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to send input to a screen session from php. So far I have followed the steps explained here
Is running GNU Screen suid root the only way to make multiuser mode work?

And I have set "multiuser on" and "acladd www-data" in the screenrc file (or well, no. in another file that I use by the -c option but still)

My problem now is that whenever i try to acess screen by php

exec('screen -S user/session -p 0 -X stuff "test"'."\n", $ret);  

I get the error:

Cannot opendir /var/run/screen/S-user: Permission denied
share|improve this question

migrated from Nov 1 '12 at 9:22

This question came from our site for professional and enthusiast programmers.

I have no idea why a question about using php belongs on this site rather than stackoverflow.. but apparently it does – Zlug Nov 1 '12 at 10:23
You're doing it wrong. ...that aside, maybe you will find this useful:… – Ярослав Рахматуллин Nov 1 '12 at 12:09
I unfortunately didn't – Zlug Nov 1 '12 at 12:29

Permissions, Permissions, Permissions

The user that is running the PHP Interpreter does not have the required permissions to access the screen session that you have running.

You have given the user www-data permission to use the screen, however, access to the screen file is denied. Try and modify the permissions for the file to allow the www-data user to read/write.

share|improve this answer
I figured that much, what I didn't figured was how to give it, if the dir itself has any other permission than 700 screen won't run – Zlug Nov 1 '12 at 7:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .