Re: Create Dependency Group - Permission denied
Kenneth Burgener <[email protected]> Wed, 09 Jul 2008 11:41:25 -0600
| Newsgroups | gmane.comp.java.anthill |
|---|---|
| Message-ID | <[email protected]> |
On 7/9/2008 8:19 AM, Steve Boone wrote: > Kenneth, > > It appears that if it is not permissions related, perhaps the file it is > trying to create is an invalid file name? > > On Tue, Jul 1, 2008 at 5:53 PM, Kenneth Burgener <[email protected] > <mailto:[email protected]>> wrote: > > I have several projects that build successfully. Today I tried to > add a Dependency Group only to get the following error: > > 15:45:58:067 [http-8080-Processor25] ERROR > com.urbancode.anthill.web.admin.CreateDependencyGroupServlet - > Permission denied > java.io.IOException: Permission denied > at java.io.UnixFileSystem.createFileExclusively(Native Method) I did eventually figure a way around the problem. Apparently when creating a dependency group, Anthill writes out to a temporary file ("_temp.dependencies") to the "current working directory". There is a /etc/init.d/anthill startup script that starts Tomcat as a service, and also runs tomcat as the user "build". Because this service starts up on boot, the working directory could potentially be anywhere, but most likely either '/' or '/root', both of which are not writable by the user "build". Why is Anthill writing this temporary file to the current directory instead of the location of the "anthill.home" property? Or to "/tmp"? Or to "anthill.home"/projects where the dependency file is eventually written to? Or even to one of Tomcat's folders? I would consider this a bug. Anyway, as a band-aid I have the startup script change to the "anthill.home" location, and I no longer have errors. The startup script is a common startup script for Tomcat. None of the Tomcat startup scripts I have seen (or even non tomcat startup scripts) ever forcefully change directories to make Tomcat work, as most Tomcat apps rely on properties to locate things, and not the current working directory. I might suggest to one of the Anthill developers, or Anthill patch submitters, or some java programmer to submit a patch for this. Kenneth