Desktop: CSync failed due to unhandled permission denied

Created on 19 Feb 2019  路  3Comments  路  Source: nextcloud/desktop

Expected behaviour

Sync should complete without error, or a useful error message should be provided.

Actual behaviour

Sync fails with error message "CSync failed due to unhandled permission denied."

Steps to reproduce

  1. Right-click folder sync connection->Force sync now

Client configuration

Client version: 2.3.3 build 84

Operating system: Mac OS 10.14.1

OS language: ?

Installation path of client: /Applications

The weird thing is I get no additional error information whatsoever. This error generates nothing in the log window (in fact, if I clear the log, then force a sync, it stays completely empty for a while, until it starts generating scheduling entries". Server logs are completely clean too. I'm stumped. I tried re-creating the sync connection, but no dice. Next step will be to reinstall the client. Not sure when this started happening, but my suspicion is after the OS update. Checked the folder permissions, but nothing unusual popped out at me.

0. Needs triage feature sync engine

Most helpful comment

You can also try adding the nextcloud application in System Settings > Privacy and Security > Privacy > Full Disk Access if you're on Mojave. The previous comment did not work for me, but this did.

All 3 comments

Alright reinstalling got me some useful info from the logs:

[_csync_detect_update   Checking for rename based on inode # 6972879
[_csync_detect_update   file: Photos Library.photoslibrary, instruction: INSTRUCTION_NEW <<=
[csync_ftw  opendir failed for /Users/arielleking/Pictures/Photos Library.photoslibrary - errno 1
[OCC::SyncEngine::handleSyncError   ERROR during  csync_update :  "Permission denied."
[OCC::ActivityWidget::addError  Item  "Pictures"  retrieved resulted in  "Permission denied."
[OCC::ActivityListModel::addErrorToActivityList     Error successfully added to the notification list:  "Permission denied."

Looks like the problem is reading the photos library. But the permissions on it are the same as the permissions on the rest of the folders in ~/Pictures (drwxr-xr-x), none of which have problems...

What do the permissions need to be?

So the issue is with the new permissions system in Mojave. Nextcloud must be given explicit access to Photos via the System Preferences (Privacy and Security).

For whatever reason, though, Nextcloud does not generate the popup whereby you can grant that permission when its requested by the app. Other apps do this seamlessly (I discovered the issue by running xattr -l on the library which caused the popup to appear)

You can also try adding the nextcloud application in System Settings > Privacy and Security > Privacy > Full Disk Access if you're on Mojave. The previous comment did not work for me, but this did.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ackis picture Ackis  路  4Comments

Engineer-of-Stuff picture Engineer-of-Stuff  路  3Comments

rguenther-dz picture rguenther-dz  路  3Comments

dkebler picture dkebler  路  3Comments

putt1ck picture putt1ck  路  4Comments