syncthing / syncthing/syncthing-macos

Full disk access using macOS privacy protection support

Open
#95 3 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Objective-C
Stars
3.9k
Forks
203
Avg merge
3d 14h
Merged PRs (30d)
2

Description

Hi,

macOS Mojave introduced additional protection aimed towards privacy. It means that application does not have access to things like camera, contacts, photos library, etc. by default. In case of photos library, the files and folder permissions seems right, there is no ACLs and still the Syncthing cannot scan the folder with an error:

2019-02-21 22:28:03 Scanner (folder xsxxx-xxxxx, file "."): scan: open /Users/user/Pictures/Biblioteka Zdjęcia.photoslibrary/Masters: operation not permitted

Interestingly and confusingly, the .stfolder is created. The Console.app tells a little more if someone know what to look at:

Sandbox: syncthing(757) System Policy: deny(1) file-read-data /Users/user/Pictures/Biblioteka Zdjęcia.photoslibrary/Masters

There are two workarounds (at least two known to me):

  1. Run Syncthing executable from terminal.

    $ /Applications/Syncthing.app/Contents/MacOS/Syncthing

    Note, that the below form will not work, it will have the same issue as Syncthing started by double click or auto started:

    $ open /Applications/Syncthing.app

  2. Go to Sytem settings -> Security & privacy -> Privacy, choose Full access to disk category and add Syncthing (the names may be different, I have polish version and translated back to english). This will work with Syncthing started in any way.

    Note, that adding Syncthing to just Photos category is not possible. From what I have read the application must declare in a manifest that it requires the access and then explicitly ask user to grant it.

So I think that ideally Syncthing would ask user for permission to access photos library in such case. Less ideally, the error would mention that this may be the issue with macOS privacy protection (I do not know if this is official name). Otherwise it is really hard to find out what is going on. Especially for someone that do not know about that macOS feature.

The Syncthing-macos version is 1.0.0-2, Syncthing version is 1.0.1, macOS is Mojave version 10.14.3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure when launching /Applications/Syncthing.app and compare it with the terminal executable; use Console.app to inspect the macOS privacy denial. Done means the macOS-launched application handles the required Full Disk Access situation or clearly reports the privacy-protection cause instead of only showing the scan error.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, objective-c
Domain
desktop, operating-systems, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.