Bugzilla – Attachment 38021 Details for
Bug 13876
Permission issues on updating via installer - dev installations
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 13876: Fallback to /tmp if logdir is not writable
PASSED-QA-Bug-13876-Fallback-to-tmp-if-logdir-is-n.patch (text/plain), 2.03 KB, created by
Kyle M Hall (khall)
on 2015-04-17 10:27:57 UTC
(
hide
)
Description:
[PASSED QA] Bug 13876: Fallback to /tmp if logdir is not writable
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2015-04-17 10:27:57 UTC
Size:
2.03 KB
patch
obsolete
>From 8499cc08ff79c7bcbdf2e0b06c816015f6f51be9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 19 Mar 2015 16:54:02 +0100 >Subject: [PATCH] [PASSED QA] Bug 13876: Fallback to /tmp if logdir is not writable > >If the logdir directory is not writable by the koha user, the installer >should not explode. >This patch uses a temporary directory as a fallback. >That means that the history won't be kept. > >Test plan: >0/ Generate an update (modify updatedatabase.pl and kohaversion) >1/ Make sure the permission are not correct on $logdir >2/ Go on the interface and execute the update entry. >3/ Confirm that the log has been created in a temporaty directory. > >Retry with correct permissions and confirm the log will be created in >$logdir. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Adding a follow-up for completely resolving encountered issues. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Signed-off-by: Chris Nighswonger <cnighswonger@foundations.edu> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > installer/install.pl | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > >diff --git a/installer/install.pl b/installer/install.pl >index 46f3e3a..63094ab 100755 >--- a/installer/install.pl >+++ b/installer/install.pl >@@ -7,6 +7,7 @@ use diagnostics; > use C4::InstallAuth; > use CGI qw ( -utf8 ); > use POSIX qw(strftime); >+use File::Temp qw( tempdir ); > > use C4::Context; > use C4::Output; >@@ -322,6 +323,9 @@ elsif ( $step && $step == 3 ) { > > my $now = POSIX::strftime( "%Y-%m-%dT%H:%M:%S", localtime() ); > my $logdir = C4::Context->config('logdir'); >+ unless ( -w $logdir ) { >+ $logdir = tempdir; >+ } > my ( $logfilepath, $logfilepath_errors ) = ( $logdir . "/updatedatabase_$now.log", $logdir . "/updatedatabase-error_$now.log" ); > > my $cmd = C4::Context->config("intranetdir") . "/installer/data/$info{dbms}/updatedatabase.pl > $logfilepath 2> $logfilepath_errors"; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 13876
:
37014
|
37022
|
37052
|
37053
|
37094
|
37095
|
37906
|
37965
|
37966
|
37999
|
38000
|
38001
|
38002
|
38004
| 38021 |
38022
|
38023