Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

Can I change permissions of a message que

Go to solution
Renda Skandier
Frequent Advisor

Can I change permissions of a message que

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

A. Clay Stephenson
Acclaimed Contributor

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.