XMLWordPrintable

    • False
    • None
    • False

      Description of problem:

      When we create a configmap following: https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.5/html-single/user_guide/index#enabling-artifact-repositories-in-a-restricted-environment
      The script in the filesystem is read-only, and it is not executable:
      che-demo (main) $ chmod +x /home/user/init-java8-truststore.sh
      chmod: changing permissions of '/home/user/init-java8-truststore.sh': Read-only file system
      It is important to execute it via:

      $ bash /home/usr/init-java8-truststore.sh

      Another possible workaround is:
      {{}}
      $ cp /home/user/init-java-11-truststore.sh /tmp && chmod +x /tmp/init-java-11-truststore.sh && /tmp/init-java-11-truststore.sh
      {}The executable mode should be set for these scripts based on label/annotation.
       
       

      Steps to Reproduce

      1. Create a configmap file following:
        https://access.redhat.com/documentation/en-us/red_hat_openshift_dev_spaces/3.5/html-single/user_guide/index#enabling-artifact-repositories-in-a-restricted-environment
      $ cat init-truststore.yaml 
      kind: ConfigMap
      apiVersion: v1
      metadata:
        name: init-truststore
        annotations:
          controller.devfile.io/mount-as: subpath
          controller.devfile.io/mount-path: /home/user/
        labels:
          controller.devfile.io/mount-to-devworkspace: 'true'
          controller.devfile.io/watch-configmap: 'true'
      data:
        init-java8-truststore.sh: |
          #!/usr/bin/env bash
          touch /tmp/lorem.txt
          echo "Lorem ipsum dolor sit amet." > /tmp/amet.txt
      1. Create this object in the user's workspace:
      $ oc project alice-devspaces
      $ oc create -f init-truststore.yaml 
      1. Create a workspace and try to execute the init-truststore.sh script. 
      che-demo (main) $ chmod +x /home/user/init-java8-truststore.sh chmod: changing permissions of '/home/user/init-java8-truststore.sh': Read-only file system

      Actual results:

      The filesystem is Read-only, and not possible to process chmod +x <script.sh>

      Expected results:

      Based on some kind of label/annotation, the file is created as an executable.

      Reproducibility (Always/Intermittent/Only Once): 

      Always

       

              amisevsk Angel Misevski (Inactive)
              rhn-support-rludva Radomir Ludva
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: