Fatal webdav / Error PHP - Mac desktop client sync KO

Hi everyone,
everything worked fine until an electrical failure happened at home.
My Raspberry Pi didn't want to boot anymore. So I re-installed my backup.
Everything works like a charm via web browser access. But my 3 desktop clients on my 3 Macs can't sync anymore.

I've read multiple articles here and on github's forum but I can't make it work.
It's as if a file (that no longer exists on my owncloud) was stucked somewhere and prevented sync from working.

Client configuration
Client version: Version 2.2.4 (build 3709)
Client operating system: OS X 10.9 / 10.10 / 10.11

Server configuration
Operating system: OSMC
Web server: Apache
Database: MySQL
PHP version:
ownCloud version (see ownCloud admin page): 9.1.2
Updated from an older ownCloud or fresh install: fresh install
Special configurations (external storage, external authentication, reverse proxy, server-side-encryption): storage on external USB HD

ownCloud log (data/owncloud.log)

{"reqId":"s4CE4Dy2sIx6cjZldEPB","remoteAddr":"192.168.1.2","app":"PHP","message":"fopen(\/mnt\/2ToMD\/owncloud\/linoakwak\/files\/Partage\/Recettes\/Thermomix\/Vorwerk Thermomix TM31 - Mille et une p\u00e2tes \u00e0 pain.pdf): failed to open stream: No such file or directory at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Local.php#278","level":3,"time":"2016-12-05T19:53:22+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/Partage\/Recettes\/Thermomix\/Vorwerk%20Thermomix%20TM31%20-%20Mille%20et%20une%20p%C3%A2tes%20%C3%A0%20pain.pdf","user":"****"}
{"reqId":"s4CE4Dy2sIx6cjZldEPB","remoteAddr":"192.168.1.2","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Could not open file\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(83): OCA\\\\DAV\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(459): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/var\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(248): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/var\\\/www\\\/owncloud\\\/remote.php(164): require_once('\\\/var\\\/www\\\/ownclo...')\\n#7 {main}\",\"File\":\"\\\/var\\\/www\\\/owncloud\\\/apps\\\/dav\\\/lib\\\/Connector\\\/Sabre\\\/File.php\",\"Line\":306,\"User\":\"****\"}","level":4,"time":"2016-12-05T19:53:22+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/Partage\/Recettes\/Thermomix\/Vorwerk%20Thermomix%20TM31%20-%20Mille%20et%20une%20p%C3%A2tes%20%C3%A0%20pain.pdf","user":"****"}

Any ideas ?

Thank you.

You might have luck running occ comment to fix the file cache

https://doc.owncloud.org/server/9.0/admin_manual/configuration_server/occ_command.html#file-operations

1 Like

I tried

osmc@osmc:/var/www/owncloud$ sudo -u www-data php occ files:cleanup

but terminal returned

Sorry, user osmc is not allowed to execute '/usr/bin/php occ files:cleanup' as www-data on osmc.

It may have something to do with permissions. But what ? :frowning:

up :slight_smile:
Thank you

You must run the occ-command as the user who is running the php scripts. If this is osmc, you can just execute the command without sudo -u www-data.

I will give it a try

I managed to clean cache

osmc@osmc:/var/www/owncloud$ sudo -u www-data php occ files:cleanup
0 orphaned file cache entries deleted

But nothing changed. Desktop client still unable to sync.

Another idea ?

Finally got it working !
sudo -u www-data php occ files:scan
was the solution.

1 Like