Execute Command node fails with "spawn /bin/sh EACCES"

Describe the problem/error/question

I recently updated my n8n instance on TrueNAS to 2.3.2 and I had a workflow that was using the Execute Command node that worked fine until this update. Where it used to work I now get

spawn /bin/sh EACCES

as the error message. Command execution works fine from the command line, I’ve tested spawning the /bin/sh executable as well as passing a command to it such as /bin/sh -c “echo” and both work.

What is the error message (if any)?

spawn /bin/sh EACCES

Please share your workflow

Share the output returned by the last node

{
“errorMessage”: “Forbidden by access permissions, make sure you have the right permissions”,
“errorDetails”: {
“rawErrorMessage”: [
“spawn /bin/sh EACCES”
]
},
“n8nDetails”: {
“nodeName”: “Execute Command”,
“nodeType”: “n8n-nodes-base.executeCommand”,
“nodeVersion”: 1,
“itemIndex”: 0,
“time”: “1/9/2026, 10:21:33 PM”,
“n8nVersion”: “2.3.2 (Self Hosted)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: Forbidden by access permissions, make sure you have the right permissions”,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-nodes-base@file+packages+nodes-base_@[email protected]_asn1.js@5_8da18263ca0574b0db58d4fefd8173ce/node_modules/n8n-nodes-base/nodes/ExecuteCommand/ExecuteCommand.node.ts:102:12)“,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)”,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1045:8)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1226:11)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1662:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_ec37920eb95917b28efaa783206b20f3/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2297:11"
]
}
}

Information on your n8n setup

  • n8n version: 2.3.2
  • Database (default: SQLite): default
  • n8n EXECUTIONS_PROCESS setting (default: own, main): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: TrueNAS Scale

Hi @Avvyxx,

Which version of n8n did you upgrade from?

I didn’t make a note of what the actual n8n version was before I updated but according to the TrueNAS charts the previous version was 2.3.1.

Ok so you were already on version 2 by the sounds of it which voids my suspicion. Are you able to roll back using a backup

I am unfortunately not able to roll back. I suspect the issue is caused by the fact that the user running n8n is the default TrueNAS apps user with UID 568 while the actual node user in n8n is set to a UID of 1000.

1 Like

Creating a custom docker image with the following fixed the issue:

FROM n8nio/n8n

USER root

RUN deluser node || true

RUN addgroup -g 568 node

RUN adduser -D -u 568 -G node node

RUN mkdir -p /home/node && chown -R node:node /home/node

USER node
2 Likes

I am having the same issue. I have to revert back to 2.3.0 to get access to /home/node. Anyway this can be resolved without building a custom image?