File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes File Permissions on *nix/Tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "File Permissions on *nix/Tomcat" Watch "File Permissions on *nix/Tomcat" New topic

File Permissions on *nix/Tomcat

Jimmy Blacknight

Joined: Mar 10, 2006
Posts: 2
Hi there.

I am techie with a web hosting company and we have a Tomcat/Apache server that has had a bit of an issue

A client on the server is creating a file from their site/servlet. Thats fine, it works grand. The problem comes when they try to access the file from FTP or anywhere else.

the file is created under the user that Tomcat runs under, and has the *nix permissions of -rw-------

Is there a way they could set the permission of the file from their servlet or perhjaps make a copy of the file, and change the owner of it?
Ben Souther

Joined: Dec 11, 2004
Posts: 13410

I don't think you'll find anyting within Tomcat's configuration settings for doing this.

Have you looked into setting the umask environment variable for the user under which Tomcat is running?

Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Jimmy Blacknight

Joined: Mar 10, 2006
Posts: 2
I havent but i will, cheers
I agree. Here's the link:
subject: File Permissions on *nix/Tomcat
Similar Threads
Need help with installing
Servlets work, JSPs do not...
download files from UNC using jsp
Apache Seems to Have Gone Deaf
Can't delete file in Tomcat directory