How to change tomcat jmx password's file permission

試著忘記壹切 提交于 2019-12-21 07:16:09

问题


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

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