Bug 1081114 - Missleading log message while having no permission to jon server directory
Summary: Missleading log message while having no permission to jon server directory
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Installer, Launch Scripts, Upgrade
Version: JON 3.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: CR01
: JON 3.3.1
Assignee: Libor Zoubek
QA Contact: Filip Brychta
URL:
Whiteboard:
: 1087368 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-26 15:53 UTC by Armine Hovsepyan
Modified: 2016-06-09 12:57 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2015-02-27 19:58:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
permissions-error-message2 (1019 bytes, text/x-log)
2014-03-26 15:53 UTC, Armine Hovsepyan
no flags Details
permissions-error-message (37.89 KB, text/x-log)
2014-03-26 15:53 UTC, Armine Hovsepyan
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1192927 0 low CLOSED Improve permission checking for agent installed via rhqctl 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1244652 0 unspecified CLOSED Wrong permission denied error msg for some cases when applying patch. 2021-02-22 00:41:40 UTC

Internal Links: 1192927 1244652

Description Armine Hovsepyan 2014-03-26 15:53:29 UTC
Created attachment 879073 [details]
permissions-error-message2

Description of problem:
CP1 - missleading log message while having no permission to jon-server-3.2.0.GA

Version-Release number of selected component (if applicable):
jon 3.2.1 CP1

How reproducible:
always

Steps to Reproduce:
1. install jon 3.2.0 GA as "non-root" user (rhqctl install --start, wait for full installation, auto-inventory...)
2. stop jon 3.2.0 GA (rhqctl stop)
3. su
4. chown root:root jon-server-3.2.0.GA
5. chmod 700 jon-server-3.2.0.GA -Rf
7. su -"non-root"
8. apply CP1 on jon-server-3.2.0.GA (/jon-server-3.2.0.GA-update-01/apply-updates.sh  jon-server-3.2.0.GA)


Actual results:
log message tells  - We could not detect a valid (JON server) OR (JON agent) directory at [jon-server-3.2.0.GA]

Expected results:
log message hints that this may be cause of permissions

Additional info:
logs attached

in case of only one dir without permission - patch script logs message telling:
 
cp: cannot stat `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main/jbossweb-7.2.2.Final-redhat-2.jar': Permission denied
cp: cannot stat `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main/module.xml': Permission denied
cp: preserving permissions for `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main': Operation not permitted

Comment 1 Armine Hovsepyan 2014-03-26 15:53:50 UTC
Created attachment 879074 [details]
permissions-error-message

Comment 2 Larry O'Leary 2014-04-02 20:32:22 UTC
This is the same/similar issue to what was identified in bug 1081149.

If you start a process on a machine as userA and then stop it... start it as root... then stop it... then try to start it as userA, it will fail. This is because userA isn't root or doesn't have sufficient privileges.

However, we should probably take care of the error message here and explicitly check for permissions. I believe we can detect the file/directory exist and also check to see if we have read/write permission separately.

Comment 4 Jay Shaughnessy 2014-09-05 21:58:17 UTC
This is a CP issue, setting to 3.3.1 as no more 3.2.x releases are planned afaik.

Comment 5 Larry O'Leary 2015-01-13 23:21:05 UTC
*** Bug 1087368 has been marked as a duplicate of this bug. ***

Comment 6 Simeon Pinder 2015-01-19 20:52:48 UTC
Moving into CR01 target milestone as missed ER01 cutoff.

Comment 7 Libor Zoubek 2015-01-21 09:35:19 UTC
proposed patch 99d5564 pushed to JON internal repo to branch lzoubek/BZ1081114

Comment 8 Simeon Pinder 2015-02-13 22:35:58 UTC
Cherry-picked Comment7 and some additional commits. This is fixed with the following commits in order:
2a566a9f87
62a5b836de
31f568e782
9303d44e23
72cec907de
1a65ae0c94
f0070ca57d

Moving to MODIFIED for inclusion in next brew build.

Comment 9 Simeon Pinder 2015-02-16 04:49:30 UTC
Moving to ON_QA as available to test with latest CP build:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/16/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip
*Note: jon-server-patch-3.3.0.GA.zip maps to CR01 build of jon-server-3.3.0.GA-update-01.zip.

Comment 10 Filip Brychta 2015-02-16 08:51:31 UTC
Verified on
Version :	
3.3.0.GA Update 01
Build Number :	
ab9ebbd:884011b


Note You need to log in before you can comment on or make changes to this bug.