Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Android Security Essentials Live Lessons this week in the Android forum!
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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: File Permissions on *nix/Tomcat
 
Similar Threads
Can't delete file in Tomcat directory
Need help with installing
Servlets work, JSPs do not...
download files from UNC using jsp
Apache Seems to Have Gone Deaf