aspose file tools*
The moose likes Tomcat and the fly likes Wrong file permission when creating a new folder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Wrong file permission when creating a new folder" Watch "Wrong file permission when creating a new folder" New topic
Author

Wrong file permission when creating a new folder

Kristian Delin
Greenhorn

Joined: Nov 29, 2011
Posts: 3
Hello,

I'm trying to create folders and save files to these folders running my applications through tomcat. The problem is that when I'm creating a folder it gets the permission: rw-r--r-- when I then want to create a folder or file in that folder I don't have permission to do that. What do I have to do to be able to create folders with the permissions rwxr--r-- running from tomcat. I can do this when I'm not using tomcat. Can I make some configurations to make this work?
Ashwin Sridhar
Ranch Hand

Joined: Jul 09, 2011
Posts: 272

The problem may not be with Tomcat. You probably try and set read,write & execute booleans.



Ashwin Sridhar
SCJP | SCWCD | OCA
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16305
    
  21

Also, check to make sure that the userid that Tomcat is running under has those permissions (and in the case of Unix/Linux, umask settings).

Applications running inside of Tomcat should be operating under the same rules as they would if they were stand-alone java apps.

Also, PLEASE don't create files or directories inside WARs or the Tomcat directories (in case you're doing that). Even when it works, it's dangerous.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrong file permission when creating a new folder