[FIXED] MacOS sync client: "Csync failed due to unhandled permission denied"

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version: 16.0.1
Operating system and version: Debian 10
Apache or nginx version: Apache 2.4.38 Debian
PHP version: 7.3.4-2

The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): N

Steps to replicate it:

  1. Open Nextcloud app in MacOS
  2. See message “Csync failed due to unhandled permission denied”

The output of your Nextcloud log in Admin > Logging:

<snip>
{"reqId":"rvwZ76TQ4KH7dWHHZUTW","level":4,"time":"2019-07-08T20:50:28+00:00","remoteAddr":"192.168.1.151","user":"kit","app":"webdav","method":"PUT","url":"\/nextcloud\/remote.php\/dav\/files\/kit\/To_put_away\/Emails\/Agenda%20Bristol%20Vist%20Thurs%208th%20to%20Fri%209th%20April%202010%20Updated%2007.04.10%09%20Updated.doc","message":{"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\InvalidPath","Message":"File name contains at least one invalid character","Code":0,"Trace":[{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Tree.php","line":76,"function":"getChild","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["Agenda Bristol Vist Thurs 8th to Fri 9th April 2010 Updated 07.04.10\t Updated.doc"]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/LockPlugin.php","line":59,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->","args":["files\/kit\/To_put_away\/Emails\/Agenda Bristol Vist Thurs 8th to Fri 9th April 2010 Updated 07.04.10\t Updated.doc"]},{"function":"getLock","class":"OCA\\DAV\\Connector\\Sabre\\LockPlugin","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.1.6\/nextcloud\/remote.php\/dav\/files\/kit\/To_put_away\/Emails\/Agenda%20Bristol%20Vist%20Thurs%208th%20to%20Fri%209th%20April%202010%20Updated%2007.04.10%09%20Updated.doc","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"OCA\\DAV\\Connector\\Sabre\\LockPlugin"},"getLock"],[{"absoluteUrl":"https:\/\/192.168.1.6\/nextcloud\/remote.php\/dav\/files\/kit\/To_put_away\/Emails\/Agenda%20Bristol%20Vist%20Thurs%208th%20to%20Fri%209th%20April%202010%20Updated%2007.04.10%09%20Updated.doc","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":466,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["beforeMethod",[{"absoluteUrl":"https:\/\/192.168.1.6\/nextcloud\/remote.php\/dav\/files\/kit\/To_put_away\/Emails\/Agenda%20Bristol%20Vist%20Thurs%208th%20to%20Fri%209th%20April%202010%20Updated%2007.04.10%09%20Updated.doc","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/var\/www\/html\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.1.6\/nextcloud\/remote.php\/dav\/files\/kit\/To_put_away\/Emails\/Agenda%20Bristol%20Vist%20Thurs%208th%20to%20Fri%209th%20April%202010%20Updated%2007.04.10%09%20Updated.doc","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/var\/www\/html\/nextcloud\/remote.php","line":163,"args":["\/var\/www\/html\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/var\/www\/html\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","Line":227,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"16.0.1.1"}
{"reqId":"BhQ5rHUhw6owCyfxlaGv","level":2,"time":"2019-07-10T21:05:10+00:00","remoteAddr":"192.168.1.151","user":"--","app":"core","method":"POST","url":"\/nextcloud\/index.php\/login?clear=1","message":"Login failed: 'admin' (Remote IP: '192.168.1.151')","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko\/20100101 Firefox\/67.0","version":"16.0.1.1"}
{"reqId":"T8Y7TbQ9BR8sBDd8teph","level":2,"time":"2019-07-10T21:05:19+00:00","remoteAddr":"192.168.1.151","user":"--","app":"core","method":"POST","url":"\/nextcloud\/index.php\/login?user=admin","message":"Login failed: 'admin' (Remote IP: '192.168.1.151')","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.14; rv:67.0) Gecko\/20100101 Firefox\/67.0","version":"16.0.1.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => 'ocavlh1pgyu4',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '192.168.1.6',
  ),
  'datadirectory' => '/media/cloud/sync/',
  'dbtype' => 'mysql',
  'version' => '16.0.1.1',
  'overwrite.cli.url' => 'https://192.168.1.6/nextcloud',
  'dbname' => 'nextclouddb',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'me',
  'mail_domain' => '',
  'mail_smtpauth' => 1,
  'mail_smtphost' => '',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'mail_smtpauthtype' => 'PLAIN',
);

The output of your Apache/nginx/system log in /var/log/____:

[Wed Jul 10 00:00:05.659719 2019] [ssl:warn] [pid 32311] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Wed Jul 10 00:00:05.659893 2019] [mpm_prefork:notice] [pid 32311] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1c configured -- resuming normal operations
[Wed Jul 10 00:00:05.659902 2019] [core:notice] [pid 32311] AH00094: Command line: '/usr/sbin/apache2'
[Wed Jul 10 21:32:04.518530 2019] [mpm_prefork:notice] [pid 32311] AH00169: caught SIGTERM, shutting down
[Thu Feb 14 10:12:09.249152 2019] [ssl:warn] [pid 654] AH01909: 127.0.0.1:443:0 server certificate does NOT include an ID which matches the server name
[Thu Feb 14 10:12:16.372182 2019] [ssl:warn] [pid 656] AH01909: 127.0.0.1:443:0 server certificate does NOT include an ID which matches the server name
[Thu Feb 14 10:12:16.378108 2019] [mpm_prefork:notice] [pid 656] AH00163: Apache/2.4.38 (Debian) OpenSSL/1.1.1c configured -- resuming normal operations
[Thu Feb 14 10:12:16.378156 2019] [core:notice] [pid 656] AH00094: Command line: '/usr/sbin/apache2'
192.168.1.135 - - [10/Jul/2019:22:15:03 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 3081 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.151 - kit [10/Jul/2019:22:15:18 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1285 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.151 - kit [10/Jul/2019:22:15:22 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1205 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.135 - - [10/Jul/2019:22:15:33 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 3081 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.151 - kit [10/Jul/2019:22:15:48 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1285 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.151 - kit [10/Jul/2019:22:15:52 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1205 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.135 - - [10/Jul/2019:22:16:03 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 3081 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.151 - kit [10/Jul/2019:22:16:18 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1285 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.151 - kit [10/Jul/2019:22:16:22 +0100] "PROPFIND /nextcloud/remote.php/dav/files/kit/ HTTP/1.1" 207 1205 "-" "Mozilla/5.0 (Macintosh) mirall/2.3.3 (build 84) (Nextcloud)"
192.168.1.135 - - [10/Jul/2019:22:16:33 +0100] "GET /nextcloud/ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 3081 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:12:42 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 ::1 - - [10/Jul/2019:22:13:07 +0100] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.4.38 (Debian) OpenSSL/1.1.1c (internal dummy connection)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:13:14 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:13:46 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:14:18 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:14:50 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:15:22 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:15:54 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:16:26 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"
192.168.1.6:80 192.168.1.1 - - [10/Jul/2019:22:16:58 +0100] "GET /nextcloud/status.php HTTP/1.1" 301 565 "-" "Mozilla/5.0 (Windows) mirall/2.3.2 (build 1) (Nextcloud)"

Anyone? Nextcloud is completely unusable like this… thanks.

I’ve fixed this.

  1. Open Terminal
  2. Run “/Applications/nextcloud.app/Contents/MacOS/nextcloud --logfile ~/nextcloudlog”
  3. Open the logfile “nano ~/nextcloudlog”
  4. Go to the bottom of the file using “ctrl + _” then “ctrl + v”
  5. Found the below error in the log:
07-12 11:05:23:103 0x7fed2a650bb8 _csync_detect_update: file: .Spotlight-V100, instruction: INSTRUCTION_NEW <<=
07-12 11:05:23:103 0x7fed2a650bb8 csync_ftw: opendir failed for /Volumes/Extreme 900/.Spotlight-V100 - errno 1
07-12 11:05:23:103 0x7fed2a650bb8 csync_statedb_close: sqlite3_close=0
07-12 11:05:23:104 1884838 OCC::SyncEngine::handleSyncError:  #### ERROR during  csync_update :  "CSync failed due to unhandled$
07-12 11:05:23:127 1884838 OCC::SyncJournalDb::close: void OCC::SyncJournalDb::close() "/Volumes/Extreme 900/._sync_49c676388c5$
07-12 11:05:23:127 1884838 OCC::SyncJournalDb::commitTransaction: No database Transaction to commit
  1. Added “.Spotlight-V100” to the “ignore” list and it’s running again.

Be nice if the app told me which file was causing the issue, rather than giving me an unhelpful message saying something failed.

I had the same problem with Mac. Solved it with not using “.” in folder- & filenames.
I had the issue with the name “versch. Objekte”

Best Regards
Michael