error: operation not permitted #21469

Closed
opened 2026-02-21 20:12:43 -05:00 by yindo · 2 comments
Owner

Originally created by @zlove520 on GitHub (Jan 6, 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.10.1 ->fix.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Deploy Dify 1.10.1 using official Docker Compose configuration.
  2. Enter the dify-sandbox container via docker exec -it dify-sandbox bash.
  3. Install pandas with pip install pandas (or specify version).
  4. Verify pandas installation in the container:
    python -c "import pandas as pd; print(pd.__version__)"
    
    

✔️ Expected Behavior

Pandas should be imported normally in the Code Execution Node, just like in the sandbox container's Python environment.

Actual Behavior

error: operation not permitted is thrown immediately when importing pandas in Code Execution Node, even though the library is correctly installed and accessible in the container.

Originally created by @zlove520 on GitHub (Jan 6, 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.10.1 ->fix.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. Deploy Dify 1.10.1 using official Docker Compose configuration. 2. Enter the `dify-sandbox` container via `docker exec -it dify-sandbox bash`. 3. Install pandas with `pip install pandas` (or specify version). 4. Verify pandas installation in the container: ```bash python -c "import pandas as pd; print(pd.__version__)" ### ✔️ Expected Behavior Pandas should be imported normally in the Code Execution Node, just like in the sandbox container's Python environment. ### ❌ Actual Behavior error: operation not permitted is thrown immediately when importing pandas in Code Execution Node, even though the library is correctly installed and accessible in the container.
yindo added the 🐞 bug label 2026-02-21 20:12:43 -05:00
yindo closed this issue 2026-02-21 20:12:43 -05:00
Author
Owner

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

The "operation not permitted" error when importing pandas in the Code Execution Node is caused by the sandbox service running your code in a restricted environment, which often blocks certain system calls (syscalls) required by pandas or its dependencies. Installing pandas in the main container doesn't affect the sandbox, since it uses its own isolated environment and security settings.

To troubleshoot and resolve this:

  1. Check the sandbox logs for more details about the error and see if there are messages about blocked syscalls or inaccessible directories.
  2. Make sure pandas is installed inside the sandbox container's environment, not just the main container.
  3. Verify that directories like /tmp and the working directory inside the sandbox are writable and exist.
  4. If the error persists, try temporarily adding security_opt: - seccomp:unconfined or privileged: true to the sandbox service in your docker-compose.yaml and restart. If this fixes the issue, it confirms a security policy is blocking required syscalls. Remove these options after testing for security.
  5. For a permanent fix, update volumes/sandbox/conf/config.yaml and add the required syscall numbers to allowed_syscalls. You can use strace inside the sandbox to identify which syscalls are being blocked when the error occurs, then restart the sandbox container after updating the config. See this discussion for details.
  6. If you recently updated Dify, make sure to restart your Docker Compose stack to apply any permission fixes from recent changes, such as the new init container that fixes storage permissions PR #29297.

Let me know if you need more specific steps for any of these actions.

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 6, 2026): <!-- Answer --> The "operation not permitted" error when importing pandas in the Code Execution Node is caused by the sandbox service running your code in a restricted environment, which often blocks certain system calls (syscalls) required by pandas or its dependencies. Installing pandas in the main container doesn't affect the sandbox, since it uses its own isolated environment and security settings. To troubleshoot and resolve this: 1. Check the sandbox logs for more details about the error and see if there are messages about blocked syscalls or inaccessible directories. 2. Make sure pandas is installed inside the sandbox container's environment, not just the main container. 3. Verify that directories like `/tmp` and the working directory inside the sandbox are writable and exist. 4. If the error persists, try temporarily adding `security_opt: - seccomp:unconfined` or `privileged: true` to the sandbox service in your `docker-compose.yaml` and restart. If this fixes the issue, it confirms a security policy is blocking required syscalls. Remove these options after testing for security. 5. For a permanent fix, update `volumes/sandbox/conf/config.yaml` and add the required syscall numbers to `allowed_syscalls`. You can use `strace` inside the sandbox to identify which syscalls are being blocked when the error occurs, then restart the sandbox container after updating the config. See [this discussion](https://github.com/langgenius/dify/discussions/25871#discussioncomment-14437916) for details. 6. If you recently updated Dify, make sure to restart your Docker Compose stack to apply any permission fixes from recent changes, such as the new init container that fixes storage permissions [PR #29297](https://github.com/langgenius/dify/pull/29297). Let me know if you need more specific steps for any of these actions. <!-- 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/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/5ea8ec24-5e63-49fd-9a8d-18da582a89f0?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%20when%20importing%20pandas%20in%20the%20Code%20Execution%20Node%20is%20caused%20by%20the%20sandbox%20service%20running%20your%20code%20in%20a%20restricted%20environment%2C%20which%20often%20blocks%20certain%20system%20calls%20%28syscalls%29%20required%20by%20pandas%20or%20its%20dependencies.%20Installing%20pandas%20in%20the%20main%20container%20doesn%27t%20affect%20the%20sandbox%2C%20since%20it%20uses%20its%20own%20isolated%20environment%20and%20security%20settings.%0A%0ATo%20troubleshoot%20and%20resolve%20this%3A%0A%0A1.%20Check%20the%20sandbox%20logs%20for%20more%20details%20about%20the%20error%20and%20see%20if%20there%20are%20messages%20about%20blocked%20syscalls%20or%20inaccessible%20directories.%0A2.%20Make%20sure%20pandas%20is%20installed%20inside%20the%20sandbox%20container%27s%20environment%2C%20not%20just%20the%20main%20container.%0A3.%20Verify%20that%20directories%20like%20%60/tmp%60%20and%20the%20working%20directory%20inside%20the%20sandbox%20are%20writable%20and%20exist.%0A4.%20If%20the%20error%20persists%2C%20try%20temporarily%20adding%20%60security_opt%3A%20-%20seccomp%3Aunconfined%60%20or%20%60privileged%3A%20true%60%20to%20the%20sandbox%20service%20in%20your%20%60docker-compose.yaml%60%20and%20restart.%20If%20this%20fixes%20the%20issue%2C%20it%20confirms%20a%20security%20policy%20is%20blocking%20required%20syscalls.%20Remove%20these%20options%20after%20testing%20for%20security.%0A5.%20For%20a%20permanent%20fix%2C%20update%20%60volumes/sandbox/conf/config.yaml%60%20and%20add%20the%20required%20syscall%20numbers%20to%20%60allowed_syscalls%60.%20You%20can%20use%20%60strace%60%20inside%20the%20sandbox%20to%20identify%20which%20syscalls%20are%20being%20blocked%20when%20the%20error%20occurs%2C%20then%20restart%20the%20sandbox%20container%20after%20updating%20the%20config.%20See%20%5Bthis%20discussion%5D%28https%3A//github.com/langgenius/dify/discussions/25871%23discussioncomment-14437916%29%20for%20details.%0A6.%20If%20you%20recently%20updated%20Dify%2C%20make%20sure%20to%20restart%20your%20Docker%20Compose%20stack%20to%20apply%20any%20permission%20fixes%20from%20recent%20changes%2C%20such%20as%20the%20new%20init%20container%20that%20fixes%20storage%20permissions%20%5BPR%20%2329297%5D%28https%3A//github.com/langgenius/dify/pull/29297%29.%0A%0ALet%20me%20know%20if%20you%20need%20more%20specific%20steps%20for%20any%20of%20these%20actions.)&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/30625)
Author
Owner

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

python -c "import pandas as pd; print(pd.version)"

use this docker exec -it docker-sandbox-1 sh -c 'python -c "import pandas as pd; print(pd.__version__)"'

@fatelei commented on GitHub (Jan 6, 2026): > python -c "import pandas as pd; print(pd.__version__)" use this `docker exec -it docker-sandbox-1 sh -c 'python -c "import pandas as pd; print(pd.__version__)"'`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#21469