Bug 2394 - permissions for /tmp/screens
permissions for /tmp/screens
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: screen (Show other bugs)
6.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-04-28 11:31 EDT by Leos Bitto
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-04-28 11:54:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Leos Bitto 1999-04-28 11:31:20 EDT
When I run screen as root, I get this message:

Directory '/tmp/screens' must have mode 755.

OK, chmod 755 /tmp/screens. Later I try to run screen as
regular user, and I get differnent messgae:

Directory '/tmp/screens' must have mode 777.

I can chmod 777 /tmp/screens, but hey, then I won't be able
to run screen as root...
Comment 1 Bill Nottingham 1999-04-28 11:54:59 EDT
fixed in screen-3.7.6-7, available in rawhide later this week...
Comment 2 David Balažic 1999-06-18 10:42:59 EDT
screen 3.7.6-9 still not 100% ok.
If /tmp/screens does not exist and root runs screen,
then /tmp/screens is created with mode 755 !
After exiting screen and rerunning it , it complains that it
should be 777. When run by other users , then it complains too.
It it doesn't exists, when non-root runs screen , then it is created
correctly with 777.
Comment 3 Chris Evans 1999-06-18 12:05:59 EDT
The correct solution, now that screen doesn't run SUID root (hurrah!),
is to run screen in the mode where it stores its files in a per-user
personal .screen directory.

Much more secure than some /tmp frig.

As it stands, the first user to run screen gets ownership of
/tmp/screens, and hence can do a trivial DoS

Note You need to log in before you can comment on or make changes to this bug.