Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Possibly regression with JSP scratch directory?

On 8/1/2024 9:48 AM, Cantor, Scott via jetty-users wrote:
Rolling back to 12.0.11, I do see a jsp folder under the webapp tmp
folder, so seems likely something got borked with the fix that's
preventing it from getting hold of the right tmp path to that
directory to append the jsp folder name to.

I tried to reproduce this, and while I did not run into the specific error Scott got, I did notice that there was no jsp subdirectory in the temporary subdirectory for the webapp.

It looks like jetty is now creating the jsp temporary directory in jetty_base, rather than in the web app specific temporary directory?

# find /var/lib/jetty/jsp
/var/lib/jetty/jsp
/var/lib/jetty/jsp/org
/var/lib/jetty/jsp/org/apache
/var/lib/jetty/jsp/org/apache/jsp
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF/jsp
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF/jsp/metadata_jsp.java
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF/jsp/metadata_jsp.class
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF/jsp/status_jsp.java
/var/lib/jetty/jsp/org/apache/jsp/WEB_002dINF/jsp/status_jsp.class
/var/lib/jetty/jsp/org/apache/jsp/index_jsp.java
/var/lib/jetty/jsp/org/apache/jsp/index_jsp.class

I am guessing Scott's jetty service account does not have write privileges to jetty_base, which is why he is seeing an error and for me the webapp works but the jsp tmp files are just in the wrong place. If I were running multiple webapps it seems their jsp temporary files would end up in the same place which isn't desirable. If you can confirm this, you might want to pull this version, as cross-contamination of jsp between webapps sounds like a possible security issue.

Also, it appears that regardless of whether persistTempDirectory is not specified, is set to true, or is set to false, the temporary directory files for the webapp are always deleted.

Although the jsp tmp directory in the wrong location remains and is not deleted at shut down…


Back to the top