diff --git a/modules/backup/acronis-install.sh b/modules/backup/acronis-install.sh index de6185f..2bbb87d 100755 --- a/modules/backup/acronis-install.sh +++ b/modules/backup/acronis-install.sh @@ -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=$?