Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission Denied #28

Open
jseiser opened this issue Jun 17, 2019 · 2 comments
Open

Permission Denied #28

jseiser opened this issue Jun 17, 2019 · 2 comments
Assignees

Comments

@jseiser
Copy link

jseiser commented Jun 17, 2019

[root@server ~]# cat /etc/*release
CentOS release 6.9 (Final)
TASK [srsp.oracle-java : Check if specific version of Oracle JDK is installed?] **********************************************************************************************************************************************************************************************
fatal: [833721]: FAILED! => {"changed": false, "cmd": "/tmp/check-java-version.sh 12.0.1", "failed_when_result": true, "msg": "[Errno 13] Permission denied", "rc": 13}

Similar to #22 Except im hitting it on check java version, and Im installing from git/master already.

Vars:

java_download_from: mirror
java_mirror: "http://mirror/jdk-8u151-linux-x64.tar.gz"
java_remove_download: true
java_version: 8
java_subversion: 151
@srsp
Copy link
Owner

srsp commented Jun 19, 2019

Interesting. Your vars say java_version: 8, but the script is executed for 12.0.1. I will try to reproduce this.

@srsp srsp self-assigned this Jun 19, 2019
@bellackn
Copy link

bellackn commented Aug 7, 2020

Hi @jseiser, I don't know if this is still relevant, but I faced the same issue on a CIS-hardenend RHEL 8 host. What helped me was this: https://unix.stackexchange.com/a/151868

So, what I ended up doing before applying this role is running a playbook like below:

- name: "XXX"
  hosts: "XXX"
  become: true

  tasks:

    # This step is necessary on (CIS-hardened) RHEL 8 hosts for the srsp.oracle-java role to
    # successfully run since it deploys an executable script to /tmp.
    # (Note: `state: remount` is not sufficient!)
    - name: Remount /tmp in case the filesystem is set to noexec.
      block:
        - name: Unmount /tmp.
          mount:
            path: /tmp
            state: unmounted
          ignore_errors: true  # This task will fail after its first execution.
        - name: Remount /tmp.
          mount:
            path: /tmp
            state: mounted
            src: tmpfs
            fstype: tmpfs
            opts: exec

After that, everything worked nicely for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants