Operating System - HP-UX
1753750 Members
5315 Online
108799 Solutions
New Discussion

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 1
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.