fix: set 755 permissions on pve CLI so non-root users can read the script
Some checks failed
Deploy to Production / Trigger production update (push) Failing after 10s

sudo cp preserves the source umask which can leave the file without
read permission for group/others.  A bash script needs both read and
execute bits — without read, the shell cannot interpret it.
This commit is contained in:
2026-08-17 01:20:43 +05:00
parent a275b8bed5
commit 820da8ca01

View File

@@ -1053,7 +1053,7 @@ install_pve_cli() {
print_error "Не удалось подготовить pve CLI"
return 1
fi
chmod +x "$tmp_cli"
chmod 755 "$tmp_cli"
# Try to install to /usr/local/bin (global PATH)
local installed=false
@@ -1062,7 +1062,7 @@ install_pve_cli() {
else
# Not root — try sudo (password may already be cached from docker ops)
if sudo cp "$tmp_cli" "$install_path" 2>/dev/null && \
sudo chmod +x "$install_path" 2>/dev/null; then
sudo chmod 755 "$install_path" 2>/dev/null; then
installed=true
fi
fi