Skip to content

Syncthing Curated App script is Dangerous #275

@khowe085

Description

@khowe085

The Syncthing curated app script gets the app installed and appearing to work properly. The user can create and share folders, but under the hood it this configuration will put data in unexpected locations and / or cause permanent data loss.

In TrueNAS you can convert the installed application to YAML. Inspecting this shows several issues that may lead to incorrect behavior and / or data loss

Problems

  • /var/syncthing is mapped to ApplicationsPerformance/syncthing/config
    • In the app, /var/syncthing is prompted as the 'default' location, and a shortcut to this folder is provided (~/). If the user creates ~/MyAwesomeFolder, then this will be created in the ApplicationsPerformance/syncthing/config dataset
Image
  • HexOS locations are mapped to directories in the container. While this looks like a good idea at first, it is actually a really bad idea and will lead to data loss

    • If the user gets this wrong, or assumes that creating /sync/MyAwesomeFolder is valid, a shared folder will be created. Any data put into this folder by a remote computer WILL be lost when the container / server is rebooted.
    • The user has manually setup and has no way of knowing that /sync/Documents maps to maps to the HexOS Documents location
  • There are duplicate bindings that may cause data in shared folders to end up in the wrong TrueNAS data set

    • Music location is bound to /sync/Music and /sync/Shows
    • Photos location is bound to /sync/Media and /sync/Photos
    • Videos location is bound to /sync/Movies and /sync/Videos

Proposed Solution

  • Modify the script so that there is a Sync dataset for syncthing shared folders, bound to /var/syncthing
    • The config dataset will still be mapped into /var/syncthing/config
  • Bind the HexOS Locations (Documents / Photos / Videos / etc) to /var/syncthing/{location}
  • Modify the syncthing config.xml to share these folders by default
    • If this isn't possible, provide the user with a list of shared folders they should create when they are setting up the app

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions