RuntimeError: error: operation not permitted #21822

Closed
opened 2026-02-21 20:14:28 -05:00 by yindo · 5 comments
Owner

Originally created by @OPSTime on GitHub (Jan 21, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.11.4

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

A small number of the following errors will occur during the execution of the workflow:

dify-api:

2026-01-22 00:28:07,271.271 ERROR [Thread-809 (_generate_worker)] [workflow_entry.py:117] 15ce12fe46a75f96bb20c32104d6f7b9 - Unknown Error when workflow entry running
Traceback (most recent call last):
File "/app/api/core/workflow/workflow_entry.py", line 113, in run
yield from generator
File "/app/api/core/workflow/graph_engine/graph_engine.py", line 294, in run
raise self._graph_execution.error
RuntimeError: error: operation not permitted

✔️ Expected Behavior

success

Actual Behavior

failed

Originally created by @OPSTime on GitHub (Jan 21, 2026). ### Self Checks - [x] I have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.11.4 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce A small number of the following errors will occur during the execution of the workflow: dify-api: 2026-01-22 00:28:07,271.271 ERROR [Thread-809 (_generate_worker)] [workflow_entry.py:117] 15ce12fe46a75f96bb20c32104d6f7b9 - Unknown Error when workflow entry running Traceback (most recent call last): File "/app/api/core/workflow/workflow_entry.py", line 113, in run yield from generator File "/app/api/core/workflow/graph_engine/graph_engine.py", line 294, in run raise self._graph_execution.error RuntimeError: error: operation not permitted ### ✔️ Expected Behavior success ### ❌ Actual Behavior failed
yindo added the 🐞 bug label 2026-02-21 20:14:28 -05:00
yindo closed this issue 2026-02-21 20:14:28 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 21, 2026):

The "operation not permitted" error during workflow execution in Dify (self-hosted, Docker) is almost always caused by permission or security restrictions in the Docker environment or the sandbox container. Here’s a focused troubleshooting checklist:

  1. Check host directory permissions: Make sure the host directory you mount (e.g., ./volumes/app/storage) is owned and writable by the container user (usually UID 1001). On your host, run:

    sudo chown -R 1001:1001 ./volumes/app/storage
    sudo chmod -R 775 ./volumes/app/storage
    

    Then restart your containers. This fixes most file access issues with mounted volumes (source).

  2. Review Docker Compose settings: The default docker-compose.yaml does not set privileged: true or security_opt: - seccomp:unconfined for the api, worker, or sandbox services. For testing, you can add these options to relax restrictions:

    privileged: true
    security_opt:
      - seccomp:unconfined
    

    Apply to the relevant services and restart. If this resolves the error, it confirms a security policy is blocking required operations (source).

  3. Sandbox image and syscalls: The default sandbox image (langgenius/dify-sandbox:0.2.12) restricts some system calls. Many users have resolved this error by switching to a more permissive sandbox image, such as svcvit/dify-sandbox-py:0.1.3, in your docker-compose.yaml:

    sandbox:
      image: svcvit/dify-sandbox-py:0.1.3
      ...
    

    This image enables network access and allows more syscalls by default (source).

  4. Check for missing/inaccessible directories: Exec into the sandbox container and verify that the working directory, /tmp, and /var/tmp exist and are writable. Missing or unwritable directories can cause syscalls like getcwd to fail (source).

  5. Advanced: Update allowed syscalls: If you need a permanent, secure fix, update the allowed_syscalls list in volumes/sandbox/conf/config.yaml to include all syscalls your code needs. Use strace inside the sandbox to identify which syscalls are being blocked, then restart the sandbox container (source).

  6. Restart after changes: Always restart your Docker Compose stack after making changes to permissions, images, or configuration to ensure they take effect.

If the error persists after these steps, check for external security layers (SELinux, AppArmor, Docker user remapping) or share more detailed logs for further diagnosis.

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other

Chat with Dosu Open in Cursor Join Discord Share on X

@dosubot[bot] commented on GitHub (Jan 21, 2026): <!-- Answer --> The "operation not permitted" error during workflow execution in Dify (self-hosted, Docker) is almost always caused by permission or security restrictions in the Docker environment or the sandbox container. Here’s a focused troubleshooting checklist: 1. **Check host directory permissions:** Make sure the host directory you mount (e.g., `./volumes/app/storage`) is owned and writable by the container user (usually UID 1001). On your host, run: ``` sudo chown -R 1001:1001 ./volumes/app/storage sudo chmod -R 775 ./volumes/app/storage ``` Then restart your containers. This fixes most file access issues with mounted volumes [(source)](https://github.com/langgenius/dify/discussions/25871#discussioncomment-14437916). 2. **Review Docker Compose settings:** The default `docker-compose.yaml` does not set `privileged: true` or `security_opt: - seccomp:unconfined` for the `api`, `worker`, or `sandbox` services. For testing, you can add these options to relax restrictions: ```yaml privileged: true security_opt: - seccomp:unconfined ``` Apply to the relevant services and restart. If this resolves the error, it confirms a security policy is blocking required operations [(source)](https://github.com/langgenius/dify/issues/30625). 3. **Sandbox image and syscalls:** The default sandbox image (`langgenius/dify-sandbox:0.2.12`) restricts some system calls. Many users have resolved this error by switching to a more permissive sandbox image, such as `svcvit/dify-sandbox-py:0.1.3`, in your `docker-compose.yaml`: ```yaml sandbox: image: svcvit/dify-sandbox-py:0.1.3 ... ``` This image enables network access and allows more syscalls by default [(source)](https://github.com/langgenius/dify/issues/15267). 4. **Check for missing/inaccessible directories:** Exec into the sandbox container and verify that the working directory, `/tmp`, and `/var/tmp` exist and are writable. Missing or unwritable directories can cause syscalls like `getcwd` to fail [(source)](https://github.com/langgenius/dify/issues/28974#issuecomment-3595380036). 5. **Advanced: Update allowed syscalls:** If you need a permanent, secure fix, update the `allowed_syscalls` list in `volumes/sandbox/conf/config.yaml` to include all syscalls your code needs. Use `strace` inside the sandbox to identify which syscalls are being blocked, then restart the sandbox container [(source)](https://github.com/langgenius/dify/issues/30625). 6. **Restart after changes:** Always restart your Docker Compose stack after making changes to permissions, images, or configuration to ensure they take effect. If the error persists after these steps, check for external security layers (SELinux, AppArmor, Docker user remapping) or share more detailed logs for further diagnosis. <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/3290e69d-2df0-4693-aaf0-075fac33ebde?feedback_type=other)</sup> [![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20%22operation%20not%20permitted%22%20error%20during%20workflow%20execution%20in%20Dify%20%28self-hosted%2C%20Docker%29%20is%20almost%20always%20caused%20by%20permission%20or%20security%20restrictions%20in%20the%20Docker%20environment%20or%20the%20sandbox%20container.%20Here%E2%80%99s%20a%20focused%20troubleshooting%20checklist%3A%0A%0A1.%20%2A%2ACheck%20host%20directory%20permissions%3A%2A%2A%20Make%20sure%20the%20host%20directory%20you%20mount%20%28e.g.%2C%20%60./volumes/app/storage%60%29%20is%20owned%20and%20writable%20by%20the%20container%20user%20%28usually%20UID%201001%29.%20On%20your%20host%2C%20run%3A%0A%20%20%20%60%60%60%0A%20%20%20sudo%20chown%20-R%201001%3A1001%20./volumes/app/storage%0A%20%20%20sudo%20chmod%20-R%20775%20./volumes/app/storage%0A%20%20%20%60%60%60%0A%20%20%20Then%20restart%20your%20containers.%20This%20fixes%20most%20file%20access%20issues%20with%20mounted%20volumes%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/discussions/25871%23discussioncomment-14437916%29.%0A%0A2.%20%2A%2AReview%20Docker%20Compose%20settings%3A%2A%2A%20The%20default%20%60docker-compose.yaml%60%20does%20not%20set%20%60privileged%3A%20true%60%20or%20%60security_opt%3A%20-%20seccomp%3Aunconfined%60%20for%20the%20%60api%60%2C%20%60worker%60%2C%20or%20%60sandbox%60%20services.%20For%20testing%2C%20you%20can%20add%20these%20options%20to%20relax%20restrictions%3A%0A%20%20%20%60%60%60yaml%0A%20%20%20privileged%3A%20true%0A%20%20%20security_opt%3A%0A%20%20%20%20%20-%20seccomp%3Aunconfined%0A%20%20%20%60%60%60%0A%20%20%20Apply%20to%20the%20relevant%20services%20and%20restart.%20If%20this%20resolves%20the%20error%2C%20it%20confirms%20a%20security%20policy%20is%20blocking%20required%20operations%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/issues/30625%29.%0A%0A3.%20%2A%2ASandbox%20image%20and%20syscalls%3A%2A%2A%20The%20default%20sandbox%20image%20%28%60langgenius/dify-sandbox%3A0.2.12%60%29%20restricts%20some%20system%20calls.%20Many%20users%20have%20resolved%20this%20error%20by%20switching%20to%20a%20more%20permissive%20sandbox%20image%2C%20such%20as%20%60svcvit/dify-sandbox-py%3A0.1.3%60%2C%20in%20your%20%60docker-compose.yaml%60%3A%0A%20%20%20%60%60%60yaml%0A%20%20%20sandbox%3A%0A%20%20%20%20%20image%3A%20svcvit/dify-sandbox-py%3A0.1.3%0A%20%20%20%20%20...%0A%20%20%20%60%60%60%0A%20%20%20This%20image%20enables%20network%20access%20and%20allows%20more%20syscalls%20by%20default%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/issues/15267%29.%0A%0A4.%20%2A%2ACheck%20for%20missing/inaccessible%20directories%3A%2A%2A%20Exec%20into%20the%20sandbox%20container%20and%20verify%20that%20the%20working%20directory%2C%20%60/tmp%60%2C%20and%20%60/var/tmp%60%20exist%20and%20are%20writable.%20Missing%20or%20unwritable%20directories%20can%20cause%20syscalls%20like%20%60getcwd%60%20to%20fail%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/issues/28974%23issuecomment-3595380036%29.%0A%0A5.%20%2A%2AAdvanced%3A%20Update%20allowed%20syscalls%3A%2A%2A%20If%20you%20need%20a%20permanent%2C%20secure%20fix%2C%20update%20the%20%60allowed_syscalls%60%20list%20in%20%60volumes/sandbox/conf/config.yaml%60%20to%20include%20all%20syscalls%20your%20code%20needs.%20Use%20%60strace%60%20inside%20the%20sandbox%20to%20identify%20which%20syscalls%20are%20being%20blocked%2C%20then%20restart%20the%20sandbox%20container%20%5B%28source%29%5D%28https%3A//github.com/langgenius/dify/issues/30625%29.%0A%0A6.%20%2A%2ARestart%20after%20changes%3A%2A%2A%20Always%20restart%20your%20Docker%20Compose%20stack%20after%20making%20changes%20to%20permissions%2C%20images%2C%20or%20configuration%20to%20ensure%20they%20take%20effect.%0A%0AIf%20the%20error%20persists%20after%20these%20steps%2C%20check%20for%20external%20security%20layers%20%28SELinux%2C%20AppArmor%2C%20Docker%20user%20remapping%29%20or%20share%20more%20detailed%20logs%20for%20further%20diagnosis.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/31366)
Author
Owner

@OPSTime commented on GitHub (Jan 21, 2026):

For the same workflow, this error occurs 36 times out of ten thousand requests.

@OPSTime commented on GitHub (Jan 21, 2026): For the same workflow, this error occurs 36 times out of ten thousand requests.
Author
Owner

@fatelei commented on GitHub (Jan 21, 2026):

2026-01-22 00:28:07,271.271 ERROR [Thread-809 (_generate_worker)] [workflow_entry.py:117] 15ce12fe46a75f96bb20c32104d6f7b9 - Unknown Error when workflow entry running
Traceback (most recent call last):
File "/app/api/core/workflow/workflow_entry.py", line 113, in run
yield from generator
File "/app/api/core/workflow/graph_engine/graph_engine.py", line 294, in run
raise self._graph_execution.error
RuntimeError: error: operation not permitted

what kind of you dsl

@fatelei commented on GitHub (Jan 21, 2026): > 2026-01-22 00:28:07,271.271 ERROR [Thread-809 (_generate_worker)] [workflow_entry.py:117] 15ce12fe46a75f96bb20c32104d6f7b9 - Unknown Error when workflow entry running > Traceback (most recent call last): > File "/app/api/core/workflow/workflow_entry.py", line 113, in run > yield from generator > File "/app/api/core/workflow/graph_engine/graph_engine.py", line 294, in run > raise self._graph_execution.error > RuntimeError: error: operation not permitted what kind of you dsl
Author
Owner

@OPSTime commented on GitHub (Jan 23, 2026):

workflow

@OPSTime commented on GitHub (Jan 23, 2026): workflow
Author
Owner

@0sengseng0 commented on GitHub (Feb 2, 2026):

same

@0sengseng0 commented on GitHub (Feb 2, 2026): same
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21822