This is an automated email from the ASF dual-hosted git repository.

morrysnow pushed a commit to branch branch-3.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.1 by this push:
     new a3f7212b4db branch-3.1: [improve](bin) do not chmod if current user 
has x and r privilige #56351 (#56379)
a3f7212b4db is described below

commit a3f7212b4db938fefba231231a75cbcae838613a
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu Sep 25 17:41:17 2025 +0800

    branch-3.1: [improve](bin) do not chmod if current user has x and r 
privilige #56351 (#56379)
    
    Cherry-picked from #56351
    
    Co-authored-by: Yongqiang YANG <[email protected]>
---
 bin/start_be.sh       | 6 ++++--
 cloud/script/start.sh | 4 +++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/start_be.sh b/bin/start_be.sh
index ecd0fa8af7a..abffdebe96e 100755
--- a/bin/start_be.sh
+++ b/bin/start_be.sh
@@ -169,8 +169,11 @@ setup_java_env() {
 # prepare jvm if needed
 setup_java_env || true
 
+if [[ ! -x "${DORIS_HOME}/lib/doris_be" || ! -r "${DORIS_HOME}/lib/doris_be" 
]]; then
+    chmod 550 "${DORIS_HOME}/lib/doris_be"
+fi
+
 if [[ "${RUN_VERSION}" -eq 1 ]]; then
-    chmod 755 "${DORIS_HOME}/lib/doris_be"
     "${DORIS_HOME}"/lib/doris_be --version
     exit 0
 fi
@@ -320,7 +323,6 @@ if [[ -f "${pidfile}" ]]; then
     fi
 fi
 
-chmod 550 "${DORIS_HOME}/lib/doris_be"
 log "Start time: $(date)"
 
 if [[ ! -f '/bin/limit3' ]]; then
diff --git a/cloud/script/start.sh b/cloud/script/start.sh
index 17c3791e1cd..c1577ebdb48 100644
--- a/cloud/script/start.sh
+++ b/cloud/script/start.sh
@@ -102,7 +102,9 @@ lib_path="${DORIS_HOME}/lib"
 bin="${DORIS_HOME}/lib/${process_name}"
 export LD_LIBRARY_PATH="${lib_path}:${LD_LIBRARY_PATH}"
 
-chmod 550 "${DORIS_HOME}/lib/${process_name}"
+if [[ ! -x "${DORIS_HOME}/lib/${process_name}" || ! -r 
"${DORIS_HOME}/lib/${process_name}" ]]; then
+    chmod 550 "${DORIS_HOME}/lib/${process_name}"
+fi
 
 if [[ ${enable_hdfs} -eq 1 ]]; then
     if [[ -z "${JAVA_HOME}" ]]; then


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to