2 Replies Latest reply on Aug 3, 2005 12:04 PM by Scott Stark

    JBoss temporary directories

    Jon Hart Newbie

      First of, let me say sorry if I botch any of the terminology here.

      I'm having a problem relating to permissions of the JBOSS_HOME and subsequent subdirectories. Previously, the entire JBOSS_HOME was owned by user foo:foo and that was the user that ran JBoss. I've since changed this and only allowed the foo user to have control over the $JBOSS_HOME/server/blah/{work,tmp,deploy,data} directories.

      This seems to work fine in that JBoss starts up without complaints. However, when I go to visit one of our JSPs, the compilation process fails because the foo user does not have permission to write to $JBOSS_HOME (specifically, $JBOSS_HOME/files1854029287).

      I did a bunch of searching and apparently this is an ant related problem that JBoss triggers:


      The relevant errors that I'm getting are:

      Error creating temporary file
      java.io.FileNotFoundException: /apps/jboss/files1854029287 (Permission denied)

      I thought the scratchdir parameter for the jsp server in web.xml was the fix, but it is not. I've changed all web.xmls that I can get my hands on.

      Is there way around this? If I'm leaving anything out, please let me know and I'd be happy to provide it.

      Thanks in advance!

        • 1. Re: JBoss temporary directories
          Jon Hart Newbie

          I've banged my head on this quite a bit more and have yet to find a solution. Well, I've found a few possible solutions but none of them are without bringing on more problems.

          It turns out this is an Ant problem, as shown by this bug:


          I thought to myself "I have Ant 1.6.5 installed. Why is this a problem?" In talking this over with others here, having Ant installed locally means nothing in the context of jboss because JBoss bundles its own ant.jar anyway. So, unless the particular JBoss I have installed (3.2.3) has an ant.jar that contains this fix, I'm out of luck.

          One solution that was proposed and I'm testing now is setting the sticky bit on $JBOSS_HOME and ensure that it is owned by root:jboss (chown root:jboss $JBOSS_HOME; chmod 1770 $JBOSS_HOME). This seems to work in that the pesky file gets created properly and the jboss user does not have full control over everything in $JBOSS_HOME.

          Another solution was to copy the new ant.jar to the appropriate place in the JBoss install. This also seems to work though we are unsure what other bugs this may introduce.

          We are eventually going to migrate to the latest JBoss but that will require more testing.

          • 2. Re: JBoss temporary directories
            Scott Stark Master

            The only thing that uses ant is the jsp compiler so if upgrading works for your pages it works.

            Latter jboss/tomcat bundles do not use ant by default to compile jsp pages. It uses the ecplise jdt compiler in memory.