Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology Surveillance Station not found after running the script [SOLUTION] #28

Open
deadboy18 opened this issue Oct 28, 2024 · 0 comments

Comments

@deadboy18
Copy link

For those who are having the issue of after running the script Synology not found on the newer version, You can follow these to solve at least that what helped me but the license thing didn't work I guess its that version specific.

Fixing Synology Surveillance Station after Script Execution

Problem

After running a script to modify the Synology Surveillance Station to allow for additional licenses, the service became unavailable, showing a "Page not found" error. This occurred due to critical files being replaced or modified. The goal was to restore the original files from backup and get the service running again.

Solution

Step 1: Access Synology via SSH

To restore the original files, we needed root access via SSH. Follow these steps to enable SSH and connect:

  1. Enable SSH on Synology NAS:

    • Log in to Synology DiskStation Manager (DSM).
    • Go to Control Panel -> Terminal & SNMP.
    • Check the box for Enable SSH service.
    • Keep the default port (22) or set a custom one.
    • Click Apply.
  2. Connect to the Synology via SSH:

    • Open a terminal (on macOS/Linux) or use PuTTY (on Windows).

    • Run the following command to connect to the NAS:

      ssh admin@<your-nas-ip>
    • Replace admin with your DSM username and <your-nas-ip> with your NAS's IP address.

    • Enter the password when prompted.

Step 2: Switch to Root User

Since certain directories and files require root privileges, we switched to the root user:

sudo -i

Enter the admin password to switch to root.

Step 3: Restore the Backup Files

The script we initially ran created backups of the modified files. We used the following commands with sudo to restore them.

  1. Restore libssutils.so:

    Navigate to the lib directory of Surveillance Station:

    cd /var/packages/SurveillanceStation/target/lib/

    Restore the backup with sudo:

    sudo cp ./libssutils.so_backup ./libssutils.so

    Set the appropriate ownership and permissions using sudo:

    sudo chown SurveillanceStation:SurveillanceStation ./libssutils.so
    sudo chmod 0644 ./libssutils.so
  2. Restore S82surveillance.sh:

    Navigate to the scripts directory of Surveillance Station:

    cd /var/packages/SurveillanceStation/target/scripts/

    Restore the backup with sudo:

    sudo cp ./S82surveillance.sh_backup ./S82surveillance.sh

    Set the appropriate ownership and permissions using sudo:

    sudo chown SurveillanceStation:SurveillanceStation ./S82surveillance.sh
    sudo chmod 0755 ./S82surveillance.sh

Step 4: Restart Surveillance Station

After restoring the files, restart the Surveillance Station service to apply the changes using sudo:

sudo /usr/syno/bin/synopkg restart SurveillanceStation

Step 5: Verify the Fix

  1. Open your web browser and access the Surveillance Station interface via DSM.
  2. Confirm that the "Page not found" error is resolved and that the Surveillance Station service is back online.

Additional Notes

  • Always make sure to take note of any critical files being modified by custom scripts, and if possible, perform a backup of these files before running the script.
  • Be cautious when running scripts from external sources that modify core system files.
  • If the issue persists or more severe errors occur, consider reinstalling the Surveillance Station package via DSM Package Center to restore it to factory settings.
@deadboy18 deadboy18 changed the title Synology Surveillance Station not found after running the script Synology Surveillance Station not found after running the script [SOLUTION] Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant