Created attachment 993890 [details] 3.3.0_3.3.1_apply_patch_no_permission 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 How reproducible: always Steps to Reproduce: 1. install jon 3.3.0 as root 2. apply patch as non-root 3. Actual results: 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 Expected results: no misleading log is create Additional info: 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... [miburman@miranda jon-server-3.3.0.GA-update-02]$ Or do we want to remove the mkdir error also?
Pushed to release/jon3.3.x: commit d91ba5ed4f1f909835fa8ed792100dc7531afb81 Author: Michael Burman <yak> 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: https://brewweb.devel.redhat.com/buildinfo?buildID=446732 *Note: jon-server-patch-3.3.0.GA.zip maps to ER01 build of jon-server-3.3.0.GA-update-03.zip.
Created attachment 1052396 [details] apply_patch_no_permissions.log
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. https://rhn.redhat.com/errata/RHSA-2015-1525.html