1

I am trying to expose to users parts of a configuration file to have them change the status of a flag(s) at will. The file is on a VM in the network and user access a simple web app with a toggle buttons to change the status of the flags in the file. The only way I was able to achieve this so far was to have the Tomcat instance run with a user that has access to the VM and the path given to the read/write algorithm is something similar to:

String content = FileUtils.readFileToString(new File("\\<VM_ADDRESS>\D$\path\to\file"));

Users login to the web app using Active Directory credentials and I would like to manage access to the file based on those AD user groups.

I there a way to read the content of a file using a different user? How can you supply credentials to the READ/WRITE process to comply with windows permissions in java code?

Viorel Florian
  • 594
  • 9
  • 29

0 Answers0