This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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 REST with Spring (video course) this week in the Spring 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
It's not a secret anymore!