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:
@@ -254,7 +254,23 @@ fi
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Make executable
|
# 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
|
# Run installer
|
||||||
echo "→ Running Acronis installer..."
|
echo "→ Running Acronis installer..."
|
||||||
@@ -263,10 +279,10 @@ echo -e "${DIM}─────────────────────
|
|||||||
|
|
||||||
if [ -z "$INSTALL_FLAGS" ]; then
|
if [ -z "$INSTALL_FLAGS" ]; then
|
||||||
# Interactive mode - run directly
|
# Interactive mode - run directly
|
||||||
./Cyber_Protection_Agent_for_Linux_x86_64.bin
|
bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin
|
||||||
else
|
else
|
||||||
# Unattended mode
|
# Unattended mode
|
||||||
./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS
|
bash ./Cyber_Protection_Agent_for_Linux_x86_64.bin $INSTALL_FLAGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
INSTALL_EXIT_CODE=$?
|
INSTALL_EXIT_CODE=$?
|
||||||
|
|||||||
Reference in New Issue
Block a user