问题
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
-Dcom.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?
回答1:
Follow the instructions on this page to protect the password file.
回答2:
This will work on Windows 7.
In short:
1) open a windows command prompt in your ActiveMQ 'conf' folder.
2) use icacls (run 'icacls' without options for help) to change the owner to be 'you', in my case:
icacls jmx.password /setowner myuser
3) remove all inherited permissions:
icacls jmx.password /inheritance:r
4) grant minimal permissions to your user (read/write in this case):
icacls jmx.password /grant:r myuser:(r,w)
回答3:
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
来源:https://stackoverflow.com/questions/6501101/how-to-change-tomcat-jmx-passwords-file-permission