Setting MSMQ permissions for a private queue created by a different user

老子叫甜甜 提交于 2019-11-30 22:28:31

问题


The person who was previously using my PC at work set up a private MSMQ that I need to access. They have since left the bank but the permissions remain and I can't access the queue or give myself edit permission to remove the restriction.

I am an admin on this machine now so I'm assuming there's some way for me to change things..Been searching high and low but most of what I find is related to doing things through scripts.

Any help appreciated,

thanks


回答1:


Right click on Your Queue -> Properties -> Security -> Goto Advanced and modify permission for groups.




回答2:


And for a manual process if all else fails:

  1. Stop the MSMQ Service (Services -> Message Queuing)
  2. Open the C:\WINDOWS\system32\msmq\storage\lqs folder
  3. Find the config file in this folder that describes a queue that has "good" security permissions. You will need to open each file in turn with a text editor to determine which queue it relates to.
  4. Once you have the correct file open, locate the line in the file that begins Security=....
  5. Copy the whole line to your clipboard (watch out for Word Wrap, this line will be quite long)
  6. Find the config file in this folder that describes your problem queue
  7. Open this file in a text editor.
  8. Overwrite the Security=... line in this file with the contents of your clipboard
  9. Save the modified file
  10. Start the MSMQ service; new permissions will be picked up.

Cheers

John Breakwell




回答3:


First, change the ownership of the queue to the Administrators group; then assign yourself the permissions you need.




回答4:


The easiest approach to allow modifying permissions from the user which didn't allow do this is to run PowerShell as Administrator as run command:

Get-MsmqQueue -Name "MyQueue" -QueueType Private | 
  Set-MsmqQueueAcl -UserName "Everyone" -Allow FullControl

and then edit permissions from your user.



来源:https://stackoverflow.com/questions/4603787/setting-msmq-permissions-for-a-private-queue-created-by-a-different-user

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!