From ca5dee056b8d373fd327fa5958a5eaaf719da17c Mon Sep 17 00:00:00 2001 From: Tejas Kochar Date: Fri, 29 May 2026 17:57:44 +0000 Subject: [PATCH] Use install -m 755 for explicit binary mode Under restrictive umasks such as 0027, `chmod +x` + `cp` produces a 0750 binary. When installed via sudo, the binary is owned by root, leaving non-root users unable to execute it. `install -m 755` sets the mode atomically and ignores umask. Co-authored-by: Isaac --- install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/install.sh b/install.sh index 0e1d1e9b..ee3e1bb0 100755 --- a/install.sh +++ b/install.sh @@ -85,9 +85,8 @@ curl -fsSL -O "https://github.com/databricks/cli/releases/download/v${VERSION}/$ # Unzip release archive. unzip -q "${FILE}.zip" -# Add databricks to path. -chmod +x ./databricks -cp ./databricks "$TARGET" +# Install at 0755, independent of umask. +install -m 755 ./databricks "$TARGET/" echo "Installed $("$TARGET/databricks" -v) at $TARGET/databricks." # Clean up temporary directory.