Fix Acronis installer execution permissions issue

Changes:
- Added verification after chmod +x to ensure permissions were set
- Changed execution from './file' to 'bash ./file' for better compatibility
- Added detailed error handling if chmod fails
- Shows file permissions on error for debugging

This fixes 'Permission denied' error (exit code 126) when running installer.
This commit is contained in:
cschantz
2025-11-06 15:58:24 -05:00
parent d4878c2d27
commit 03aea73fca
+19 -3
View File
@@ -254,7 +254,23 @@ fi
echo ""
# Make executable
chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin"
if ! chmod +x "Cyber_Protection_Agent_for_Linux_x86_64.bin"; then
print_error "Failed to set executable permissions"
cd /
rm -rf "$TEMP_DIR"
press_enter
exit 1
fi
# Verify file is executable
if [ ! -x "Cyber_Protection_Agent_for_Linux_x86_64.bin" ]; then
print_error "Installer file is not executable"
ls -lh "Cyber_Protection_Agent_for_Linux_x86_64.bin"
cd /
rm -rf "$TEMP_DIR"
press_enter
exit 1
fi
# Run installer
echo "→ Running Acronis installer..."
@@ -263,10 +279,10 @@ echo -e "${DIM}─────────────────────
if [ -z "$INSTALL_FLAGS" ]; then
# Interactive mode - run directly
./Cyber_Protection_Agent_for_Linux_x86_64.bin
bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin
else
# Unattended mode
./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS
bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS
fi
INSTALL_EXIT_CODE=$?