Hi,

> ls -las /usr/bin/screen
> 328 -rwxr-sr-x 1 root utmp 328448 Mar  6 16:36 /usr/bin/screen

ok, then there are a couple of other reasons why this could be
the case. I've just added a new Q&A pair to the upcoming version
because there's often confusion about this:

>>>
Q: screen always complains about the permissions of /var/run/screen.
   What's wrong?

A: Simplified, the binary ensures that $SCREENDIR has just enough permission
   bits enabled so that each user can create and access his socket directory.
   This means:

   /usr/bin/screen setuid root -> /var/run/screen 0755
   /usr/bin/screen setgid utmp -> /var/run/screen 0775
   /usr/bin/screen without setid bits -> /var/run/screen 0777

   These cases are all handled by the init script. However, the actual test
   is a bit more complicated. And as the variable names are all quite self-
   explanatory, just have a look at the C code itself:

]   n = (eff_uid == 0 && (real_uid || (st.st_mode & 0775) != 0775)) ? 0755 :
]       (eff_gid == (int)st.st_gid && eff_gid != real_gid) ? 0775 :
]       0777;
]   if (((int)st.st_mode & 0777) != n)
]     Panic(0, "Directory '%s' must have mode %03o.", SockDir, n);

   If the invoking user has primary group utmp, the above assumption will fail.
   The same holds if the underlying file system is mounted 'nosuid'. In these
   cases you have to adapt the init script yourself.
>>>


Regards,

Jan

Attachment: signature.asc
Description: Digital signature

Reply via email to