my dog learned polymorphism*
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

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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

Wrong file permission when creating a new folder

Kristian Delin

Joined: Nov 29, 2011
Posts: 3

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
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

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.
Don't get me started about those stupid light bulbs.
subject: Wrong file permission when creating a new folder
Similar Threads
Error starting Tomcat in Ubuntu
creating private files and folders
keytool error:
what to expect from a tomcat provider
Install Tomcat on Linux