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

dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


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

commit 1c7c7b2400e5677f7917804fcba1b54f1b36fee5
Author: Yongqiang YANG <[email protected]>
AuthorDate: Wed Sep 24 12:20:38 2025 +0800

    [improve](bin) do not chmod if current user has x and r privilige (#56351)
---
 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 ebfb45de300..874cbff2783 100755
--- a/bin/start_be.sh
+++ b/bin/start_be.sh
@@ -182,8 +182,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
@@ -333,7 +336,6 @@ if [[ -f "${pidfile}" && "${RUN_BENCHMARK}" -eq 0 ]]; 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