Created attachment 993890 [details]
Description of problem:
no patched log created when user does not have permission to apply patch
Version-Release number of selected component (if applicable):
JON 3.3.1 CR2
Steps to Reproduce:
1. install jon 3.3.0 as root
2. apply patch as non-root
The following log is visible >100 lines:
./jon-server-3.3.0.GA-update-01/apply-updates.sh: line 140: /home/hudson/jon-server-3.3.0.GA/.patched/3.3.0.GA-update-$date/update.log: No such file or directory
The following log is printed:
Missing write permissions for existing JON installation files, see '/home/hudson/jon-server-3.3.0.GA/.patched/3.3.0.GA-update-$date/update.log' for more details.
No update log is created
no misleading log is create
result log attached
The new output without permissions:
[miburman@miranda jon-server-3.3.0.GA-update-02]$ cp ~/projects/git/jon/patches/apply-updates.sh . | sed -i -e 's/UPDATE_VERSION=\"03\"/UPDATE_VERSION=\"02\"/' apply-updates.sh && ./apply-updates.sh ../jon-server-3.3.0.GA
Testing for INSTALL_PATCH_DEST[JON Server|JON agent] directory.
Successfully detected server [../jon-server-3.3.0.GA] to be upgraded. Proceeding...
Proceeding with application of patch '02' to ../jon-server-3.3.0.GA
Checking [Server] file permissions...
mkdir: cannot create directory ‘../jon-server-3.3.0.GA/.patched’: Permission denied
Missing write permissions for existing JON installation files.
Unable to apply update. Exiting...
Or do we want to remove the mkdir error also?
Pushed to release/jon3.3.x:
Author: Michael Burman <email@example.com>
Date: Mon Jun 29 14:22:40 2015 +0300
[BZ 1194638] Do not try to perform log appending if log file is not writeable
Available for test with 3.3.3 ER01 build:
*Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of
Created attachment 1052396 [details]
when user does not have permission to directory - apply patch log does not show no permissions - expected
when user has permission to directory but does not have permission to update/write into jon server dir - permission log is visible - expected
see log attached
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.