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

link|improve this question
feedback

2 Answers

up vote 6 down vote accepted

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...

link|improve this answer
1  
+1 for paranoia sense – chmeee May 19 '10 at 16:48
yep, that was pretty much why i gave +1 too... were it me, i probably wouldn't have given it a second thought to just restore the setuid bit... i /might/ have checked to see that it wasn't a link or something like that, but i doubt it. – cpbills May 19 '10 at 17:41
I upgraded 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 – digital May 19 '10 at 19:29
It's odd that an apt package from Ubuntu would be borked -- you could always try purging and reinstalling. Double check to make sure it really did lose its setuid bit -- otherwise are you possibly in the case Flight described above (su'd or similar into another user account)? – voretaq7 May 21 '10 at 15:41
feedback

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 on su into a normal account, you normally will loose access ermissions to the pts your working on.

As the normal user, please run ps and have a look at the second field (TTY) of your processes. It shoud 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.

link|improve this answer
Note that the workaround of putting loose permissions on your TTY has other security implications (not such a horror if it's your personal machine on a secure network, but doing this on a public system with untrusted users is asking for trouble). The better solution here is usually to screen before you su :-) – voretaq7 May 19 '10 at 17:13
@voretaq7: Thanks for the comment, I've appended that warning to the post. – flight Jun 14 '10 at 13:10
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.