I am trying to manipulate a file and create a new folder from within a web service and am running into a permission denied error. What is the recommended way to configure these permissions? The use case is as follows.
- A user name is passed as a parameter in the URL along with a command.
- Based on the command, I am trying to create a file or copy some files over to a specific user directory. Safe to assume that this user is different from the user that owns tomcat.
- Is it possible to impersonate a system user for running other processes/shell scripts from within the web service?