I am trying to secure JMX access on my local tomcat instance hosted on Windows platform. I have created access and password files and plugged those using the following VM arguments:
-Dcom.sun.management.jmxremote.password.file
-Dc开发者_如何学JAVAom.sun.management.jmxremote.access.file
But I am running into an issue during tomcat start-up: Error: Password file read access must be restricted. I tried changing the password's file owner and access using file security tab but it doesn't seem to be working.
Any thoughts?
This will work on Windows 10 and 7.
In short:
open a windows command prompt in your ActiveMQ 'conf' folder.
use icacls (run 'icacls' without options for help) to change the owner to be 'you', in my case:
icacls jmx.password /setowner myuser
- remove all inherited permissions:
icacls jmx.password /inheritance:r
- grant minimal permissions to your user (read/write in this case):
icacls jmx.password /grant:r myuser:(r,w)
Follow the instructions on this page to protect the password file.
This worked for me, in command prompt go to your file location and type,
cacls jmxremote.password /P [username]:R
Replace [username] with your own username
精彩评论