Running screen without root

I recently updated screen on my server and for some reason when logged in as a normal user I can no longer create a screen session. If I run sudo screen it works.

It's probably a permissions error somewhere but I'm not where to find it.

Any help would be greatly appreciated.

Update:

I upgraded screen using apt-get upgrade in Ubuntu Server 9.04, I've just removed and purged it then reinstalled. It still allows me to create a screen as root but results in a blank screen as normal user. I tried to build from source and while doing a make it spewed a load of errors (too much to post here). Intersetingly I could create a screen then but when I went I create another screen (shell?) in the screen it was blank. Attempting building from source on 4.0.3


Solution 1:

Screen is normally installed setuid-root -- If it has lost its setuid bit it can break in interesting ways.

How did you go about updating screen? It's possible a vendor shipped a bad package but a build/install from source shouldn't have this issue.
My paranoia sense would be tingling if screen suddenly lost its setuid bit, and I'd be very wary of just resetting it unless I was sure the screen binary was pristine and unmolested. Screen gets run a lot and giving a possibly compromised binary setuid-root powers can really ruin your day...

Solution 2:

The user running screen needs access permissions to the /dev/pts of the console he is working on.

If you log into a console as root and later su into a normal account, you normally will lose access permissions to the pts you are working on.

As the normal user, please run ps and have a look at the second field (TTY) of your processes. It should read "pts/N" (N being a number). Then, do ls -l /dev/pts/N and verify whether the normal user has access to that file.

If he has no access, you might consider widening the access permissions of the /dev/pts/N (i.e. with the account that logged into the console). As voretaq7 points out, please keep in mind the security implications of this: The permissions are set up that way for a reason.