Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

File Permissions on *nix/Tomcat

 
Jimmy Blacknight
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Jimmy Blacknight
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I havent but i will, cheers
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic