[Bug] executeUser may no permission to access engineConnExec.sh
- Dominant language
- Java
- Stars
- 3.4k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
### Search before asking
- [X] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues.
### Linkis Component
linkis-computation-governance
### Steps to reproduce
1. make any parent path of ENGINECONN_ROOT_DIR to no execute permission for **others**. For example, ENGINECONN_ROOT_DIR is **/home/hadoop/linkis/tmp**, and **/home/hadoop** permission is **rwx------** (In fact, default permission of user home is exactly this in centos)
2. use non-hadoop user as executeUser to submit job, such as hadoop2
3. see error log that hadoop2 has no permission to **/home/hadoop/linkis/tmp/xxxxxx/engineConnExec.sh**
### Expected behavior
With no execute permission of any parent path of a file, user cannot access that file. ECM should change all parent path of ENGINECONN_ROOT_DIR to have execute permission for **others**, better to be **rwxr-xr-x**
### Your environment
- Linkis version used: 1.1.2
- Environment name and version:
- cdh-5.14.2
- hdp-3.1.5
- hive-2.1.1
- spark-3.2.1
- scala-2.12.2
- jdk 1.8.0_121
- ....
### Anything else
_No response_
### Are you willing to submit a PR?
- [x] Yes I am willing to submit a PR!
Contributor guide
Research direction
Start with ECM's handling of ENGINECONN_ROOT_DIR and creation or execution of engineConnExec.sh. Reproduce the submission as a non-hadoop executeUser when a parent directory lacks execute permission, then trace how parent-directory permissions are handled. Done means the generated script is accessible to the executeUser without breaking the reported environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100