Hello Bytes,
Computer Type: Debian Lenny Linux x86
I am trying to use shmget to create a block of shared memory. I managed to get that working fine, I run the program always in root.
My problem though is when I want a user that is non-root to access the block I keep getting Permission Denied error.
I set the S_IWOTH so that other users can access the block it doesn't seem to be working.
Am I doing something wrong?
Computer Type: Debian Lenny Linux x86
I am trying to use shmget to create a block of shared memory. I managed to get that working fine, I run the program always in root.
My problem though is when I want a user that is non-root to access the block I keep getting Permission Denied error.
I set the S_IWOTH so that other users can access the block it doesn't seem to be working.
Am I doing something wrong?
Code:
key = ftok("21312", 'R');
if ((shmid = shmget(key, 1024,IPC_CREAT | S_IWOTH)) < 0) {
perror("shmget");
exit(1);
}