How to grant web app access to restricted file? I am running a Tomcat server via Eclipse.

I have a restricted file that contains information the web application running on Tomcat needs to perform its duties.

I understand how to grant/deny access to regular users, but how to for this web app?

Info:


Macbook Pro 10.7.5 (Lion)  
Tomcat 7 
Eclipse
The first thing you need to do is discover which user owns the Tomcat process. You can do this by typing ps axu -w at the command line. The owner of the process will be in the first column. On a standard Mac install the web server (the process called httpd) is owned by the user _www. I assume Tomcat is owned by the same user.

Now change the ownership of the file so it is owned by _www and then you will be fine. Do this chown _www filename replacing filename of course.

Once you've done that you should be right.