---
title: "Resolve MSMQ MMC Access Denied Errors: Step-by-Step Troubleshooting Guide"
description: "Resolve MSMQ MMC access denied errors: step-by-step guide to restoring permissions and troubleshooting queue access issues in Windows environments."
---

:ReleaseNotes(https://portal.nodinite.com/marketplace/28):

# Troubleshooting

On this page you will find answers to some of the most frequently asked questions regarding monitoring of Message Queuing technologies.

## Access denied using the MSMQ MMC

### :fa-screwdriver-wrench: Fixing "Access Denied" in MSMQ MMC

If you're getting "Access Denied" when trying to modify MSMQ queue permissions (e.g., in MMC or via :Nodinite: monitoring), follow the revised and complete guide below to fully regain control of your queues.

#### Why this happens

This issue usually occurs because:

* The "Everyone" group or your admin user account has been removed from the queue's Security descriptor (ACL).
* MSMQ's internal queue definitions (stored as .lqs files) have incomplete or corrupted permissions.
* You're using an account that lacks NT AUTHORITY\SYSTEM or full control privileges on the queue.

#### Updated Step-by-Step Fix

>[!IMPORTANT]
>You must perform the following steps using an elevated administrator account with ownership rights to the MSMQ folder and system permissions.

##### Step 1: Stop the MSMQ Service

From an elevated Command Prompt or PowerShell:

```bash
net stop msmq
```

##### Step 2: Take Ownership of LQS Files (if needed)

Sometimes the files are protected even from administrators.

```bash
takeown /f "C:\WINDOWS\system32\msmq\storage\lqs\*" /a
icacls "C:\WINDOWS\system32\msmq\storage\lqs\*" /grant administrators:F
```

This ensures you can read/write the LQS files.

##### Step 3: Identify the Problem Queue

Navigate to:

```bash
C:\WINDOWS\system32\msmq\storage\lqs
```

Use a text editor (like Notepad++ run as Administrator) to search inside the .lqs files for your queue name (e.g., logapiserviceoneway.svc).

Open the correct file once identified.

##### Step 4: Copy a Working Security Descriptor

If you have another private queue that works (you can access it in MMC):

* Open its .lqs file.
* Find the line beginning with Security=
* Copy the entire line (watch out for word wrap)

>[!TIP]
>If you don't have another queue, create a temporary private queue in MSMQ MMC, assign it default permissions, and copy the Security= line from there.

##### Step 5: Replace Security Descriptor in Problem Queue

In the .lqs file of the problem queue, replace the existing Security= line with the working one.

Save the file (ensure it's saved as UTF-8 with no extra formatting).

###### Set Correct File Permissions on the Modified File

Sometimes even after modifying the file, MSMQ cannot read it due to incorrect file ACLs.

Run the following command:

```bash
icacls "C:\WINDOWS\system32\msmq\storage\lqs\YourQueueFile.lqs" /grant "NT AUTHORITY\SYSTEM":F
```

Replace YourQueueFile.lqs with the actual file name.

##### Step 6: Restart MSMQ

You need to restart the MSMQ service to apply changes:

```bash
net start msmq
```

##### Step 7: Verify Access in MMC

Open MMC > Message Queuing > Private Queues:

* Right-click the queue → Properties → Security tab
* Confirm you can now view and modify permissions

##### :fa-lock: Optional: Restore Secure Default Permissions

After access is restored, consider removing excess permissions and applying a known good security policy for your environment (consult your security team).

##### :fa-phone: Still having issues?

If the issue persists, your system may be affected by:

* Group Policy overwrites
* NTFS-level file locks
* MSMQ corruption

If you still cannot resolve the issue, please contact [Support][] for further assistance.

## :fa-square-plus: How do I enable monitoring of Azure Service Bus  

To Monitor the [Azure Service Bus][]; Check the **Enable monitoring** for Service Bus checkbox (default is checked). Additional configuration is required; Review the '[User access to Azure Service Bus monitoring][User access to Azure ServiceBus monitoring]' user guide for specifics.

The screenshot below is from the remote [configuration][] form available from the [Monitoring Agents][] administration page.  
![Enable Monitoring][6]  
*Example with monitoring for Azure Service Bus resources enabled.*

## :fa-hand-point-right: Next Steps

* :fa-wrench: [Configure the Message Queueing Monitoring Agent][Configuration]  
* :fa-key: [User access to Azure Service Bus monitoring][User access to Azure ServiceBus monitoring]  

## :fa-link-horizontal: Related Topics

* :fa-envelope: [Message Queueing Monitoring Agent][Message Queueing Overview]  
* :fa-square-check: [Prerequisites][Message Queueing Prerequisites]  
* :fa-download: [Install the Message Queueing Monitoring Agent][Message Queueing Install]  
* :fa-traffic-light-go: [Monitoring Azure Service Bus Queues][Azure Service Bus]  
* :fa-monitor-waveform: [Monitoring Agents][]  

[6]:{ndm}/Documentation%20Pictures/MonitorAgent/MessageQueueing/SB/EnableMonitoring.png

[Azure Service Bus]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Features/Azure%20Service%20Bus%20Queues/Monitoring%20Azure%20Service%20Bus%20Queue.md
[Configuration]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Getting%20started/3.%20Configuration.md
[Message Queueing Install]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Getting%20started/2.%20Install.md
[Message Queueing Overview]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Overview.md
[Message Queueing Prerequisites]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Getting%20started/1.%20Prerequisites.md
[Monitoring Agents]:{ndr}/Administration/2.%20Monitor%20Management/2.%20Monitor%20Agents/Features/What%20is%20a%20Monitor%20Agent.md
[Support]:https://support.nodinite.com
[User access to Azure ServiceBus monitoring]:{ndr}/Logging%20and%20Monitoring/Message%20Queueing/Features/Azure%20Service%20Bus%20Queues/User%20access%20to%20service%20bus%20monitoring.md