Question

I'm working on a project that is written in Java that uses Z3 (http://z3.codeplex.com/). Basically, Z3 creates a temporary file in a specified directory, uses it, and then deletes it. Z3 is executed from inside some Java code. The original permissions for the read/write directory were rwxrwxr_x and the Java code was throwing a FileNotFoundException (Permission denied) exception. We have changed these permissions to 777 to allow Z3 to run properly. No exceptions are being thrown now.

I want to know if there is a more proper way to handle this so the directory isn't completely vulnerable with the 777 permissions. Is there a better permissions scheme to handle this? Z3 is being executed in a separate thread, if that is useful.

Edit: This code is a web application running on a Tomcat server, which is running on an Ubuntu system.

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top