title: appspec.yml is unable to run the script
body: <p>I am unable to run the script mentioned in appspec.yml file for my node.js project. Have provided the execute permission to the runas user too. Also, changing the runas to ec2-user is not helping since the script is running with root user only. Codedeploy is able to deploy the artifacts at specified location on my ec2 server without any errors. Could someone help me with this issue. (Want to try it with Beanstalk afterwards but that too needs appspec.yml file to work !!)</p>
  
  <p><strong>appspec.yml File</strong></p>
  
  <pre><code>version: 0.0  
  os: linux  
  files:  
    - source: /  
      destination: /opt/dev  
  permissions:
    - object: /opt/dev/scripts/UnzipResourceBundle.sh
      mode: 777
      owner: root
      type:
        - file  
  
  hooks:  
    AfterInstall:  
      - location: scripts/UnzipResourceBundle.sh  
        timeout: 1800  
        runas: root 
  </code></pre>
  
  <p><strong>UnzipResourceBundle file locations and permissions (in codedeploy agent deployment folder):</strong>    </p>
  
  <pre><code>/opt/codedeploy-agent/deployment-root/7f8a2414-b048-4468-a3f5-74efa04371c7/d- 
  G7FCROQS2/deployment-archive/scripts/UnzipResourceBundle.sh
  
  
  -rwxr-xr-x 1 root root 532 Feb 27 08:07 UnzipResourceBundle.sh
  </code></pre>
  
  <p><strong>UnzipResourceBundle.sh file:</strong>  </p>
  
  <pre><code>shebang : #!/bin/bash  
  script runs the forever service and migrates db scripts.
  </code></pre>