bwaldvogel / log4j-systemd-journal-appender

Log4j appender for systemd-journal that maintains structured log data
BSD 3-Clause "New" or "Revised" License
24 stars 14 forks source link

Plug-in wants exec rights to /tmp folder #7

Closed GB11111 closed 6 years ago

GB11111 commented 6 years ago

Hello - This plug-in was working fine in our application, but then mysteriously stopped working. We are getting an UnsatisfiedLinkError /tmp/jna--1359426010/jna2000388232436467107.tmp message in the stack trace. The plug-in apparently uses JNA which in turn wants exec privileges to that subfolder. Temporarily removing noexec from /tmp in the Linux etc/fstab file resolves the problem, but this isn't something that should be granted on a permanent basis (it's a security issue).

Can you think of any reason why the plug-in would (now) need executable rights for a tmp file? Is there a workaround? Thank you!

bwaldvogel commented 6 years ago

Which version of log4j-systemd-journal-appender was working correctly for you and which version stopped working?

GB11111 commented 6 years ago

Version 2.2.2 the entire time. It is possible that the system settings changed, as we have installed our application on different virtual machines. We will not have the authority to allow exec privileges to /tmp, though. Thanks.

bwaldvogel commented 6 years ago

I could reproduce your problem by setting -Djna.tmpdir to a mount with noexec.

Would it work for you to set -Djna.tmpdir to a location with exec permissions?

GB11111 commented 6 years ago

I think this will work nicely -- thanks!