[Bug 19676] New: Debian 9 vs. Plack vs. / tmp -- attention to PrivateTmp for apache2
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 Bug ID: 19676 Summary: Debian 9 vs. Plack vs. /tmp -- attention to PrivateTmp for apache2 Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org Beware: in Debian 9 apache2 comes with PrivateTmp enabled by default. As a consequence, there are issues when Plack is enabled for an instance, but in Koha there is an interaction between Plack enabled and Plack blacklisted stuff through /tmp directory. Plack-ed scripts will write temporary files in "real" /tmp directory (as pointed by Koha::UploadedFile::temporary_directory, i.e. File::Spec->tmpdir) whereas Plack blacklisted scripts will understand /tmp as private tmp of apache2, i.e. /tmp/systemd-private-?????????-apache2.service-????/tmp. This happens for instance for stage-marc-import.pl -- in step 2 the script won't find the marc file uploaded in step 1. The simplest instant solution to this would be to disable PrivateTmp for apache2 (this article gives a clue: https://www.maxoberberger.net/blog/2017/10/debian-9-private-tmp.html), but maybe there is a better option? (When Plack is disabled everything seems to work fine apart of the fact that the private tmp of apache2 is being used.) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 Liz Rea <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |liz@catalyst.net.nz --- Comment #1 from Liz Rea <liz@catalyst.net.nz> --- For Debian Stretch (9), with plack enabled, you will need to do the following for the noted functions to work (as root or sudo, of course): #> vi /etc/system/multi-user.target.wants/apache2.service Change PrivateTmp:true to PrivateTmp:false #> systemctl daemon-reload #> systemctl restart apache2 #> systemctl show apache | grep PrivateTmp Result should be: PrivateTmp=no Ideal solution is to deal with the fact that when we fork the process, we can't read the old process's tempfiles, but this does solve the immediate problem. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 Mason James <mtj@kohaaloha.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtj@kohaaloha.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 Pongtawat <pongtawat@punsarn.asia> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pongtawat@punsarn.asia Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #2 from Pongtawat <pongtawat@punsarn.asia> --- *** This bug has been marked as a duplicate of bug 20428 *** -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 Blou <philippe.blouin@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |philippe.blouin@inlibro.com --- Comment #3 from Blou <philippe.blouin@inlibro.com> --- Bug 20428 states that it's necessary for 18.05+ only, while we have had this issue with 17.05.06 (+custom). I thus applied Liz's fix with great success. I just wanted to specify that on MY Stretch, the file to modify is in vi /etc/systemd/system/multi-user.target.wants/apache2.service (note the /systemd/ that's different from Liz's solution). In case someone else needs this in the future. Big thanks. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19676 John Sterbenz <jsterben@umich.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jsterben@umich.edu --- Comment #4 from John Sterbenz <jsterben@umich.edu> --- I second this big thanks. An OS upgrade to ubuntu 18.04 (koha 18.11) started a problem in which staging MARC records for load would upload the file but then cause failure after options were set and "Stage for import" was clicked ("Failed to submit form: error"). Bug 15032 seemed like the right place to start--it wasn't. Someone graciously pointed me here and this appears to be the fix I needed (with Philippe's directory modification). -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org