Problem with GNU screen and multiple users on Solaris 9

From: Storie, Sam [EPM/RTC] (Sam.Storie@EmersonProcess.com)
Date: Mon Dec 27 2004 - 12:56:03 EST


I am encountering an issue that I have been unable to resolve myself
concerning using the GNU 'screen' program on Solaris 9. This has been asked
on this list before, but I was unable to find a resolution in both the
archives, or via Google searches, so forgive me for trying again :) For
reference I downloaded the screen package from the sunfreeware.com website.

On a Solaris 9 system, the first user to invoke the screen program is able
to run the program without any issues or problems. However, when a different
user attempts to run it later they are presented with the following error:

shmat: Permission denied

>From some preliminary analysis [1] I've learned when screen is invoked it
uses shmget() and shmat() to allocate a chunk of shared memory with
permissions 0700. When subsequent screen sessions are opened by other users
they also try to access this same shared memory, but I suspect are denied
because of the permissions used when it was originally created. This
prevents anyone but the first user to invoke screen from using it. The root
user is always able to invoke screen, but if root is the first one to do so,
then no one else can use it.

Has anyone else encountered this situation and found a way to resolve it?
I've used screen for years on other systems and this is the first time I've
encountered a problem like this. Thanks in advance.

-Sam

[1] Here is the snippet from the truss output indicating what is causing
this error:

...
open("/proc/self/fd", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFDA50) = 0
fcntl(3, F_SETFD, 0x00000001) = 0
getdents64(3, 0x000742A8, 8192) = 176
getdents64(3, 0x000742A8, 8192) = 0
close(3) = 0
shmget(-1160968401, 18000, 0700|IPC_CREAT) = 1
shmat(1, 0, 0) Err#13 EACCES
ioctl(1, TCGETA, 0xFFBFD544) = 0
fstat64(1, 0xFFBFD460) = 0
shmat: Permission denied
write(1, " s h m a t : P e r m i".., 26) = 26
_exit(1)

---
Sam Storie
Database Administrator
Rosemount Incorporated
Emerson Process Management
(952)940-7021
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers


This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:29:55 EDT