MSMQ Queue Access Denied
If you get an "access denied" message when you try to change the permissions of an MSMQ private queue, this guide restores the queue's security descriptor so Nodinite can use the queue again.
- ✅ Step-by-step solution to restore MSMQ queue permissions
- ✅ Gets the Pickup Service and the Message Queueing Monitoring Agent reading and monitoring the queue again
- ✅ No need to delete and recreate the queue
When This Happens
In Nodinite v7, MSMQ queues are read by the Pickup Service (the MSMQ configuration picks up Log Events and sends them to the Log API) and monitored by the Message Queueing Monitoring Agent (Monitoring MSMQ). The WCF-over-MSMQ endpoint of earlier Log API versions doesn't exist in v7; see Log using WCF.
A queue becomes locked when a service or an administrator removes the Everyone group from the permissions of a private queue. You then can't change its permissions: when you click Apply or OK, you get access denied. The account that runs the Pickup Service or the agent then can't read the queue either.
Restore the Queue Permissions
The permissions of each private queue live in its LQS file. Copy the security line from a queue that works:
- Stop the Message Queuing service.
- Open the folder
C:\WINDOWS\system32\msmq\storage\lqs. - Find the file that describes your problem queue.
- In Notepad, open the LQS file of another private queue that has correct permissions. If you have no other private queue, create one.
- Find the line that begins with
Security=. - Copy the entire
Security=line; it is usually very long, so watch out for word wrap. - Open the LQS file of your problem queue in your text editor.
- Overwrite its
Security=line with the one you copied. - Save the modified LQS file.
- Start the Message Queuing service.
The problem queue now has the same permissions as the working queue. Grant the service account of the Pickup Service or the agent the rights it needs on the queue; see Logon as a Service right for the service accounts Nodinite uses.
Next Steps
- Pickup Service MSMQ configuration
- Message Queueing Monitoring Agent prerequisites
- Microsoft: Message Queues