Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Files in webapp temp dir (in /tmp) were deleted by tmpwatch

You have a few choices.

All outlined in this answer -> http://stackoverflow.com/questions/19232182/jetty-starts-in-c-temp/19232771#19232771

--
Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts


On Tue, Jan 21, 2014 at 5:49 AM, Zen Zhong <zenzhong8383@xxxxxxxxx> wrote:
Hi, Jan

I mean the extracted webapp.war, it should be extracted by jetty before it's started, if I set TEMPDIR after it's started, it should not work.

I did a test, set it in MyServletContextListener.contextInitialized: sce.getServletContext().setAttribute(ServletContext.TEMPDIR, new File(path));
It doesn't work, extracted dir is /tmp/jetty-0.0.0.0-8080-chatdemo.war-_chatdemo-any-2635942716179691302.dir

Or do you mean a parameter of jetty?

Thanks


2014/1/21 Jan Bartel <janb@xxxxxxxxxxx>

Hi,

You can configure the temp dir for your webapps using wepappcontext.settempdir method (forgive poor camel case, I'm typing this on my mobile).

Regards,
Jan

On 21/01/2014 4:50 PM, "Zen Zhong" <zenzhong8383@xxxxxxxxx> wrote:
Hi,

On our staging environment (CentOS 6, jetty-9.1.0), I found this issue before and I set up auditd, and this time, I found the command deleted the important files, it's tmpwatch. I've added "-X '/tmp/jetty*'" in /etc/cron.daily/tmpwatch as a workaround for now.

Maybe it's better to put webapp temp dir in ${jetty.home}.

Thanks

_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users


_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



_______________________________________________
jetty-users mailing list
jetty-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-users



Back to the top