From e03ed8c5b87e2845a204a78a29686f73a6deda9f Mon Sep 17 00:00:00 2001 From: "T. R. Bernstein" <137705289+trbernstein@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:27:42 +0200 Subject: [PATCH] Make brew executable for homebrew user only --- modules/03-install-brew.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/03-install-brew.sh b/modules/03-install-brew.sh index a60cdad..068589a 100755 --- a/modules/03-install-brew.sh +++ b/modules/03-install-brew.sh @@ -65,7 +65,7 @@ function ensureHomebrewOwnershipAndPermission() { local username=${homebrew_username} [[ -f ${itemPath} || -d ${itemPath} ]] || return 1 chown -R "${username}:admin" ${itemPath} - chmod ug=rwx,o=rx ${itemPath} + chmod u=rwx,go=rx ${itemPath} } function ensureInstallPrefix() { @@ -173,7 +173,7 @@ function createBrewCallerScript() { umask 002 \"${homebrew_prefix}/Homebrew/bin/brew\" \"\$@\"" > ${brewCallerPath} chown ${username}:admin ${brewCallerPath} - chmod ug+x,o-x ${brewCallerPath} + chmod u+x,go-x ${brewCallerPath} runAsHomebrewUser ln -sf ${homebrew_prefix}/Homebrew/bin/brew_caller "${homebrew_prefix}/bin/brew" }