cancel
Showing results for 
Search instead for 
Did you mean: 

shared memory is not shared

SOLVED
Go to solution
Donald Kok
Respected Contributor

shared memory is not shared

How can I make the shared memory for user ingres rw for group. Thanks in Advance.
Here follows the output from ipcs:

IPC status from /dev/kmem as of Wed Aug 14 11:42:46 2002
T ID KEY MODE OWNER GROUP
Shared Memory:
m 0 0x411c0611 --rw-rw-rw- root root
m 1 0x4e0c0002 --rw-rw-rw- root root
m 2 0x4120036d --rw-rw-rw- root root
m 1803 0x0c6629c9 --rw-r----- root root
m 4 0x06347849 --rw-rw-rw- root root
m 805 0xffffffff --rw-r--rw- root root
m 206 0x331881ab --rw------- root root
m 7 0x6d181009 --rw-rw-rw- root root
m 5008 0xc218a208 --rw------- ingres ingres
m 809 0xc218a209 --rw------- ingres ingres
m 10 0xc218a20a --rw------- ingres ingres
m 1411 0xc218a20c --rw------- ingres ingres
m 12 0xc218a20d --rw------- ingres ingres
m 413 0xc218a20f --rw------- ingres ingres
m 1814 0x00280267 --rw-r--r-- root root
My systems are 100% Murphy Compliant. Guaranteed!!!
3 REPLIES
Deepak Extross
Honored Contributor
Solution

Re: shared memory is not shared

Donald,

The program that "creates" the shared memory segment shouldcreate it with the correct permissions.

For example,
shmget (IPC_PRIVATE, 4096, 0600);
would create a 4K shared memory segment with --rw------- permissions. To make it group readable and writable, use
shmget (IPC_PRIVATE, 4096, 0660);

hope this helps.
A. Clay Stephenson
Acclaimed Contributor

Re: shared memory is not shared

If you know any C, it's rather easy using the shmctl() system call BUT normally that's not required unless you are wanting to access the shared memory segments in a way not intended by the designer.
If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: shared memory is not shared

It is to be done during the creation of shared memory segment as mentioned by Deepak. You would need to take it up with the author of the code instead you trying to change it.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try