Composer Issue When Doing exec From a Plugin Curious if anyone has ever run into this before or may know what's going on here. I'm using the execWidget plugin (https://github.com/marionnewlevant/craft-exec_widget) to run a script from Craft's dashboard that does a composer install when the lock file has changed. 

Here is the configuration for the plugin: 

&lt;?php
return [
  '*' =&gt; [
  ],
  'local' =&gt; [
    'commands' =&gt; [
      'composer install' =&gt; '../scripts/ed-day_composer.sh',
      'pull assets from production' =&gt; '../scripts/pull_assets.sh',
    ]
  ],
  'staging' =&gt; [
    'commands' =&gt; [
      'composer install' =&gt; '../scripts/ed-day_composer.sh',
      'push everything production' =&gt; '../scripts/push_all.sh',
    ]
  ],
];


Here is the composer install script:

#!/bin/bash

# Get the directory of the currently executing script
DIR="$(dirname "${BASH_SOURCE[0]}")"

# Include files
INCLUDE_FILES=(
            "common/defaults.sh"
            ".env.sh"
            "common/common_env.sh"
            "common/common_db.sh"
            )
for INCLUDE_FILE in "${INCLUDE_FILES[@]}"
do
    if [ -f "${DIR}/${INCLUDE_FILE}" ]
    then
        source "${DIR}/${INCLUDE_FILE}"
    else
        echo "File ${DIR}/${INCLUDE_FILE} is missing, aborting."
        exit 1
    fi
done

(cd "${LOCAL_ROOT_PATH}/craft"; HOME=${LOCAL_HOME} composer install)


I get a returned 127 error from the queue.log and the scrip does not actually work:

2018-06-25 14:10:12 [50.200.203.190][1][-][info][craft\queue\QueueLogBehavior::beforeExec]  [45] ExecWidget Task (attempt: 1) - Started
2018-06-25 14:10:12 [50.200.203.190][1][-][info][marionnewlevant\execwidget\jobs\ExecWidgetTask::log] executing ../scripts/ed-day_composer.sh
2018-06-25 14:10:12 [50.200.203.190][1][-][info][marionnewlevant\execwidget\jobs\ExecWidgetTask::log] returned 127


Based on testing I've done, I'm almost certain the issue is with composer because I get a success error message when I remove just the composer part of the line.

Composer works when SSHing in. Any idea what might be causing the issue?
The problem seems to be tied to Composer not having the correct permissions. Will work with our IT team to update so Composer can write appropriately when initiated from Craft.