The Template Transform node has error : operation not permitted
Self Checks
- [X] This is only for bug report, if you would like to ask a question, please head to Discussions.
- [X] I have searched for existing issues search for existing issues, including closed ones.
- [X] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
- [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
- [X] Please do not modify this template :) and fill in all the required fields.
Dify version
0.11.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
- equals string has error
{% if text == '1' %}
1
{% endif %}
- join is ok, but join(',') has error
{{text | join(','}}
- replace has error, the example from dify doc
{{ item.content | replace('\n', '\n\n') }}
✔️ Expected Behavior
no error
❌ Actual Behavior
No response
I found a similar issue related to the "operation not permitted" error in Dify, which might be relevant to your situation. The issue was discussed in this thread, where users encountered workflow errors in a self-hosted Docker environment. The suggested solution involves checking Docker and Docker Compose versions, setting proper permissions, and reviewing Docker Compose configurations [1].
Here are some steps you can try to resolve the issue:
-
Check Docker and Docker Compose Versions: Ensure you have Docker 19.03 or later and Docker Compose 1.25.1 or later installed.
docker --version docker-compose --version -
Set Proper Permissions: Make sure your user has the necessary permissions to run Docker commands.
sudo usermod -aG docker $USER -
Review and Modify Docker Compose Configuration: Ensure the
docker-compose.yamlfile is correctly configured, especially the volume mounts and network settings. -
Check Container Status: Verify that all containers are running successfully.
docker compose ps -
Review Docker Logs: Check the Docker container logs for any additional insights into the permission issue.
docker logs <container_name> -
SELinux/AppArmor Policies: If SELinux or AppArmor is active, adjust the policies to allow the needed operations.
-
Docker Security Options: Consider Docker's security options like
--cap-addor--privilegedto grant additional permissions, but use them cautiously.
These steps should help address the "operation not permitted" error. If the issue persists, further investigation into the specific error messages or logs generated by the Template Transform node might be necessary.
To continue talking to Dosu, mention @dosu.
Thanks for reporting this issue, we will take a look at this later.
Hi, @kkjinping. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.
Issue Summary
- Bug reported in the Template Transform node of Dify, version 0.11.1, when self-hosted via Docker.
- Errors encountered with string operations.
- I suggested checking Docker versions, permissions, and configurations.
- Crazywoola acknowledged the issue and mentioned that the team would investigate further.
Next Steps
- Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting here.
- If there is no further activity, this issue will be automatically closed in 15 days.
Thank you for your understanding and contribution!
0.14 as well
@crazywoola
I also have this problem. The current version of dify is 0.14.1. Has it been solved?
I also have this problem. The current version of dify is 0.14.1. Has it been solved?
It's not.
{% if text == '1' %} 1 {% endif %}
work fine on cloud and my local env
The problem I have is that the simple code works. But it won't work if you introduce sdk.
{% if text == '1' %} 1 {% endif %}
work fine on cloud and my local env
![]()
Cloud is fine. But my local env based on Docker Compose is error.
It has been found that the problem can be solved through the following steps:
- Modify the volumes mapping of the sandbox in docker-compose.yaml, and add "/volumes/sandbox/conf:/conf".
- Modify the "allowed_syscalls" in /volumes/sandbox/conf/config.yaml, and add "0-500".
