File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
JavaRanch » Java Forums » Products » Tomcat
Bookmark "File Permissions on *nix/Tomcat" Watch "File Permissions on *nix/Tomcat" New topic
Author

File Permissions on *nix/Tomcat

Jimmy Blacknight
Greenhorn

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
Sheriff

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
Greenhorn

Joined: Mar 10, 2006
Posts: 2
I havent but i will, cheers
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: File Permissions on *nix/Tomcat