• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrong file permission when creating a new folder

 
Kristian Delin
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 277
Flex Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem may not be with Tomcat. You probably try and set read,write & execute booleans.

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18212
53
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic