Open lanxing2 opened 4 days ago
Traceback the code https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/runner/WorkerTaskExecutor.java#L216 WorkerTaskExecutor.beforeExecute
https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-worker/src/main/java/org/apache/dolphinscheduler/server/worker/utils/TaskExecutionContextUtils.java#L58 TaskExecutionContextUtils.createTaskInstanceWorkingDirectory
https://github.com/apache/dolphinscheduler/blob/dev/dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/utils/FileUtils.java#L266 FileUtils.createDirectoryWith755
Need update Directory owner(I am not sure if is possible to change the owner to other tenant when the server is deployed by dolphinscheduler, not root)
Search before asking
What happened
I deploy dolphinscheduler in distributed model follow the official website guide The user I use to deploy is dolphinscheduler And the tenant I choose to run the java task is default, so the command to run the shell script is start with "sudo -u default -i " When I try to run the task, it shows no permission error, because the exec folder owner is dolphinscheduler with 755 permission The shell script need run javac to create the Java class, but user default do not have permission to create file in the exec folder If I want to run the Java Code task, I need to create a tenant dolphinscheduler and use this tenant to run the script.![1719305345238](https://github.com/apache/dolphinscheduler/assets/12789042/e4b9ebb9-1981-4a0c-8131-f1090fdebf76)
What you expected to happen
The owner of the folder for the shell script is the same as the tenant I choose to run the process, so any tenant can run the java tasks
How to reproduce
Anything else
This problem happens every time when I try to run Java Model Java Task with tenants else than the tenant which running the server
Version
3.2.x
Are you willing to submit PR?
Code of Conduct