Skip to content

Auto-accepted receive-encrypted folders should have more sensible defaults #8296

Closed

Description

@grantland

Right now I have a large folder with many items set up as "Receive Encrypted" and I was having issues where Syncthing was warning me that it was failing to watch for changes as it was hitting the inotifiy limits. With normal folder types I would understand, but watching for changes seems pointless for "Receive Encrypted" folders as there shouldn't be any changes happening on that device.

I think it would be great if "Watch for changes" were automatically disabled on "Receive Encrypted" folders as it would save memory on the device as no local changes should be happening on those folder and if there are they can be caught by periodic scanning.

Also I might be missing something about "Watch for changes" and why it might still be useful for "Receive Encrypted" folders.

Activity

  1. added
    enhancement
    needs-triage
    on Apr 21, 2022
  2. tomasz1986 commented on Apr 21, 2022

    @tomasz1986
    Member

    "Watch for changes" is already disabled by default when the folder type is set to "Receive Encrypted", so unless you've enabled it manually, it should have stayed like that.

    Have you, by any chance, encountered a situation, where it ended up being enabled? If yes, please describe the details.

  3. grantland commented on Apr 24, 2022

    @grantland
    Author

    That doesn't seem to be working properly as I was just able to reproduce it by sharing a new encrypted folder and verified that the folder on the receiving device had "Watch for Changes" checked.

  4. tomasz1986 commented on Apr 24, 2022

    @tomasz1986
    Member

    Can you elaborate what you mean by "sharing a new encrypted folder"?

    This is what I've just done.

    1. On Device 1, add a new folder to Syncthing.

    2. Share the folder with Device 2, protecting it with a password.

    3. On Device 2, wait for the notification to show up, then click the "Add" button.

    4. The folder type is automatically set to Receive Encrypted with the following settings:

      image

    Is this what you're trying to do or, if not, please describe in details all the steps that you're taking. Also, just to make sure, are you running the newest version of Syncthing on both sides? The current release is v1.19.2.

  5. grantland commented on Apr 25, 2022

    @grantland
    Author

    Yup, that's exactly what I've done except I had auto-accept enabled on the receiver. The initiator is v1.19.2, Linux (64-bit Intel/AMD) and the receiver is v1.19.2, Linux (32-bit ARM).

    I also just found "Folder Defaults" and saw it was enabled there and just disabled it after my tests. However, I'm not sure if that is enabled by default or it somehow got enabled sometime.

  6. tomasz1986 commented on Apr 25, 2022

    @tomasz1986
    Member

    Auto Accept is the culprit here. With it enabled, the folders are created using what is set in Folder Defaults, with no regard for the folder type-specific defaults.

    image

    I'd suggest to change the issue title to something like "Receive Encrypted folders have Watch for Changes enabled and Full Rescan Interval set to 3600 when added using Auto Accept" or similar.

    This may tricky to fix though, as Syncthing would have to override the user defaults here. On the other hand, it already does by automatically setting the folder type to Receive Encrypted when auto accepting password-protected folders instead of what's specified in the defaults, so this could probably be treated as an exception. Maybe do this only if the default folder type is not set to Receive Encrypted? If it is though, then just follow what's set in the defaults.

  7. changed the title [-]Disable "Watch for changes" on "Receive Encrypted" folders[/-] [+]"Receive Encrypted" folders have "Watch for Changes" enabled and "Full Rescan Interval" set to 3600 when added using "Auto Accept"[/+] on Apr 27, 2022
  8. grantland commented on Apr 27, 2022

    @grantland
    Author

    Yeah it seems reasonable to make exceptions for these values when auto-accepting receive encrypted folders since it's already doing it for receive encrypted and those other values are useless for receive encrypted folders.

  9. added a commit that references this issue on Jul 22, 2022
    a6dba7c
  10. added 2 commits that reference this issue on Jul 22, 2022
    ae24004
    17028a9
  11. added this to the v1.21.0 milestone on Jul 26, 2022
  12. added a commit that references this issue on Jul 28, 2022
    da3fe7a
  13. changed the title [-]"Receive Encrypted" folders have "Watch for Changes" enabled and "Full Rescan Interval" set to 3600 when added using "Auto Accept"[/-] [+]Auto-accepted receive-encrypted folders should have more sensible defaults[/+] on Aug 9, 2022
  14. added
    frozen-due-to-age
    on Jul 22, 2023
  15. locked and limited conversation to collaborators on Jul 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfrozen-due-to-ageneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions