Messaging
cancel
Showing results for 
Search instead for 
Did you mean: 

Can I change permissions of a message que

SOLVED
Go to solution
Renda Skandier
Frequent Advisor

Can I change permissions of a message que

Hi,
I have a set of unix message queues that I'm using to tranfer data between processes.
Permissions are set to --rw-rw-rw- by the process which created them.
msgget(key, IPC_CREAT | 0666 | 0666)

Is there a way for me to change permissions to not allow other groups to access these queues once they are already created?

Perhaps a system command similiar to chmod?

tia, Renda


1 REPLY
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Can I change permissions of a message que

There is no command to do this but is is rather easy write a small program to do a msgctl(msgqid,IPC_STAT,&buf) to load the values into buf and then change the mode and do another msgctl(msgqid,IPC_SET,&buf).
If it ain't broke, I can fix that.