WebSphere Application Server & Liberty

 View Only
  • 1.  Permission denied to run wsadmin.sh

    Posted Fri September 23, 2022 02:23 PM
    We are trying to use wsadmin.sh and jython scripts on the deployment manager(WAS 8.5/BAW 8.6) host to deploy applications in Websphere cell. Profile owner ID can launch wsadmin.sh and run scripts without any issues. When we try to run the same command with devops ID(non-admin ID) it throws below error

    -bash-4.2$ ./wsadmin.sh
    !SESSION 2022-09-21 12:52:17.183 -----------------------------------------------
    eclipse.buildId=M20060921-0945
    java.fullversion=8.0.6.31 - pxa6480sr6fp31-20210510_01(SR6 FP31)
    JRE 1.8.0 Linux amd64-64-Bit Compressed References 20210423_470221 (JIT enabled, AOT enabled)
    OpenJ9 - 19b42fd
    OMR - a028c6b
    IBM - 8165371
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
    Framework arguments: -application com.ibm.ws.bootstrap.WSLauncher
    Command-line arguments: -application com.ibm.ws.bootstrap.WSLauncher

    !ENTRY org.eclipse.osgi 4 0 2022-09-21 12:52:17.482
    !MESSAGE Error reading configuration: Permission denied
    !STACK 0
    java.io.IOException: Permission denied
    at java.io.File.createTempFile(File.java:2072)
    at org.eclipse.osgi.storagemanager.StorageManager.initializeInstanceFile(StorageManager.java:188)
    at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:707)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:213)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:147)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:114)
    at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:186)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:158)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:286)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:90)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)
    at java.lang.reflect.Method.invoke(Method.java:508)
    at org.eclipse.core.launcher.Main.invokeFramework(Main.java:340)
    at org.eclipse.core.launcher.Main.basicRun(Main.java:282)
    at org.eclipse.core.launcher.Main.run(Main.java:981)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.launchEclipse(WSPreLauncher.java:424)
    at com.ibm.wsspi.bootstrap.WSPreLauncher.main(WSPreLauncher.java:177)

    Is wsadmin.sh restricted for profile owner only? We do not want to give out the admin credentials to everyone just for deploying their application. 

    Thanks
    James

    ------------------------------
    James
    ------------------------------


  • 2.  RE: Permission denied to run wsadmin.sh

    Posted Fri September 23, 2022 06:08 PM
    Have you tried changing the perms on the temp dir on the dmgr to include R/W access for the dev ops UIDs?

    ------------------------------
    FRED ROWE
    ------------------------------



  • 3.  RE: Permission denied to run wsadmin.sh

    Posted Fri September 23, 2022 08:27 PM
    Fred,
    I changed the perms to full access on both dmgr/temp and dmgr/config/temp directories. Confirmed the devops ID can create a file in both directories. Still same error with wsadmin.sh
    James

    ------------------------------
    James
    ------------------------------



  • 4.  RE: Permission denied to run wsadmin.sh

    Posted Mon September 26, 2022 03:56 PM
    It is possible that you've hit a flavor of the issue described here.  Try the recommended solution and report back.

    ------------------------------
    FRED ROWE
    ------------------------------



  • 5.  RE: Permission denied to run wsadmin.sh

    Posted Mon September 26, 2022 04:30 PM

    Thanks for that tip.

    I didn't remove or rename configuration folder.

    I expanded the permissions (read/write/execute to all) on these folders in profile directory.

    ./configuration

    ./logs

    ./temp

     

    Now the devops user can execute wsadmin.sh

     

    Thanks again

    James Joseph

     


    This email (including any attachments) is intended for the designated recipient(s) only, and may be confidential, non-public, proprietary, and/or protected by the attorney-client or other privilege. Unauthorized reading, distribution, copying or other use of this communication is prohibited and may be unlawful. Receipt by anyone other than the intended recipient(s) should not be deemed a waiver of any privilege or protection. If you are not the intended recipient or if you believe that you have received this email in error, please notify the sender immediately and delete all copies from your computer system without reading, saving, printing, forwarding or using it in any manner. Although it has been checked for viruses and other malicious software ("malware"), we do not warrant, represent or guarantee in any way that this communication is free of malware or potentially damaging defects. All liability for any actual or alleged loss, damage, or injury arising out of or resulting in any way from the receipt, opening or use of this email is expressly disclaimed.





  • 6.  RE: Permission denied to run wsadmin.sh

    IBM Champion
    Posted Mon September 26, 2022 04:04 AM
    Hello James,

    Have you tried to enable traces?

    wsadmin.sh -javaoption -Dcom.ibm.ws.scripting.traceString=com.ibm.*=all=enabled

    And review DMGR_PROFILE\logs\wsadmin.traceout file.

    Tell us if you need more support.

    Regards

    ------------------------------
    Gabriel Aberasturi
    Versia tecnologias emergentes
    ------------------------------