FreeBSD上に入れたOwnCloud 8.2がWebDAV周りでどうもエラーが出る

これはOwnCloudが悪いのかReadyNASが悪いのか…。

{"reqId":"kZ8yk2aK3YBeIn840b5l","remoteAddr":"192.168.40.4","app":"files_external","message":"Forbidden","level":3,"time":"2016-0101T03:42:36+00:00","method":"MKCOL","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/%E8%87%AA%E7%82%8A\/%E6%97%A5%E7%B5%8C%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9"}
{"reqId":"4OUg0ULG9IclXFodM1Vt","remoteAddr":"192.168.40.4","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Failed to open file: \",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(82): OC\\\\Connector\\\\Sabre\\\\File->get()\\n#1 [internal function]: Sabre\\\\DAV\\\\CorePlugin>httpGet(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#2 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#3 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:GET', Array)\\n#4 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#5 \\\/usr\\\/local\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#6 \\\/usr\\\/local\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#7 {main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/file.php\",\"Line\":275}","level":4,"time":"2016-01-01T03:42:36+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/MPEG4\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%A2%E3%82%B8%E3%82%A2%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89\/Dr.%20HOUSE%E3%80%90%E5%8C%BB%E7%99%82%E3%80%91S8%239%E3%80%8C%E3%82%88%E3%81%8D%E4%BC%B4%E4%BE%B6%E3%80%8D.mp4"}
{"reqId":"kZ8yk2aK3YBeIn840b5l","remoteAddr":"192.168.40.4","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Sabre\\\\HTTP\\\\ClientHttpException: Forbidden\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1177): OC\\\\Connector\\\\Sabre\\\\Directory->createDirectory('\\\\xE6\\\\x97\\\\xA5\\\\xE7\\\\xB5\\\\x8C\\\\xE3\\\\x83\\\\x93\\\\xE3\\\\x82\\\\xB8\\\\xE3\\\\x83\\\\x8D...')\\n#1 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(583): Sabre\\\\DAV\\\\Server->createCollection('ReadyNAS\\\/\\\\xE8\\\\x87\\\\xAA\\\\xE7\\\\x82\\\\x8A...', Array, Array)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:MKCOL', Array)\\n#5 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/usr\\\/local\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/usr\\\/local\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#8 {main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/directory.php\",\"Line\":146}","level":4,"time":"2016-01-01T03:42:36+00:00","method":"MKCOL","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/%E8%87%AA%E7%82%8A\/%E6%97%A5%E7%B5%8C%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9"}
{"reqId":"qHuHMmAlXqF\/GpHYo6c4","remoteAddr":"192.168.40.4","app":"PHP","message":"fseek(): stream does not support seeking at \/usr\/local\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#58","level":3,"time":"2016-01-01T03:42:36+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/MPEG4\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%BB%E3%82%AB%E3%82%A4%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%BB%E3%82%AB%E3%82%A4%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89%20%2312%20%E3%83%99%E3%83%88%E3%83%8A%E3%83%A0%E7%B7%A8%20%E3%83%9B%E3%83%BC%E3%83%81%E3%83%9F%E3%83%B3%20%E3%83%AC%E3%82%BF%E3%83%B3%E3%83%88%E3%83%B3%E5%86%8D%E8%A8%AA.mp4"}
{"reqId":"c8C4a31\/Cr0VBypHzUHT","remoteAddr":"192.168.40.4","app":"PHP","message":"fseek(): stream does not support seeking at \/usr\/local\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#58","level":3,"time":"2016-01-01T03:50:43+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/MPEG4\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%A2%E3%82%B8%E3%82%A2%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89\/Dr.%20HOUSE%E3%80%90%E5%8C%BB%E7%99%82%E3%80%91S8%239%E3%80%8C%E3%82%88%E3%81%8D%E4%BC%B4%E4%BE%B6%E3%80%8D.mp4"}
{"reqId":"mftqIxkJy\/AXpvPwG9TY","remoteAddr":"192.168.40.4","app":"PHP","message":"fseek(): stream does not support seeking at \/usr\/local\/www\/owncloud\/apps\/files_external\/3rdparty\/icewind\/streams\/src\/Wrapper.php#58","level":3,"time":"2016-01-01T03:50:45+00:00","method":"GET","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/MPEG4\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%BB%E3%82%AB%E3%82%A4%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89\/%E9%AB%98%E7%94%B0%E7%B4%94%E6%AC%A1%E3%81%AE%E3%82%BB%E3%82%AB%E3%82%A4%E3%81%B7%E3%82%89%E3%81%B7%E3%82%89%20%2312%20%E3%83%99%E3%83%88%E3%83%8A%E3%83%A0%E7%B7%A8%20%E3%83%9B%E3%83%BC%E3%83%81%E3%83%9F%E3%83%B3%20%E3%83%AC%E3%82%BF%E3%83%B3%E3%83%88%E3%83%B3%E5%86%8D%E8%A8%AA.mp4"}
{"reqId":"\/SUnA\/ePQHeMA5dCmhnF","remoteAddr":"192.168.40.4","app":"files_external","message":"Forbidden","level":3,"time":"2016-01-01T03:50:45+00:00","method":"MKCOL","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/%E8%87%AA%E7%82%8A\/%E6%97%A5%E7%B5%8C%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9"}
{"reqId":"\/SUnA\/ePQHeMA5dCmhnF","remoteAddr":"192.168.40.4","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Sabre\\\\HTTP\\\\ClientHttpException: Forbidden\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(1177): OC\\\\Connector\\\\Sabre\\\\Directory->createDirectory('\\\\xE6\\\\x97\\\\xA5\\\\xE7\\\\xB5\\\\x8C\\\\xE3\\\\x83\\\\x93\\\\xE3\\\\x82\\\\xB8\\\\xE3\\\\x83\\\\x8D...')\\n#1 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(583): Sabre\\\\DAV\\\\Server->createCollection('ReadyNAS\\\/\\\\xE8\\\\x87\\\\xAA\\\\xE7\\\\x82\\\\x8A...', Array, Array)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpMkcol(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:MKCOL', Array)\\n#5 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/usr\\\/local\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/usr\\\/local\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#8 {main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/directory.php\",\"Line\":146}","level":4,"time":"2016-01-01T03:50:45+00:00","method":"MKCOL","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS\/%E8%87%AA%E7%82%8A\/%E6%97%A5%E7%B5%8C%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9"}

どうもアップロード系でトチってるっぽいのとNASとの間のような気がしたのでダメ元でReadyNASへの接続をHTTP over SSL経由にしたけどダメ。ちなみにHTTP over SSLにする場合も自己署名証明書だと怒られるのでOwnCloudの設定画面でルート証明書をインポートする必要あり (ハマった)。

{"reqId":"fiHdAcSZvsNSnz1SiB0e","remoteAddr":"192.168.40.4","app":"webdav","message":"Exception: {\"Message\":\"HTTP\\\/1.1 503 Storage not available\",\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\ServiceUnavailable\",\"Code\":0,\"Trace\":\"#0 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(920): OC\\\\Connector\\\\Sabre\\\\ObjectTree->getNodeForPath('ReadyNAS')\\n#1 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/CorePlugin.php(327): Sabre\\\\DAV\\\\Server->getPropertiesForPath('ReadyNAS', Array, 1)\\n#2 [internal function]: Sabre\\\\DAV\\\\CorePlugin->httpPropfind(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#3 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\\n#4 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(469): Sabre\\\\Event\\\\EventEmitter->emit('method:PROPFIND', Array)\\n#5 \\\/usr\\\/local\\\/www\\\/owncloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254): Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request), Object(Sabre\\\\HTTP\\\\Response))\\n#6 \\\/usr\\\/local\\\/www\\\/owncloud\\\/apps\\\/files\\\/appinfo\\\/remote.php(56): Sabre\\\\DAV\\\\Server->exec()\\n#7 \\\/usr\\\/local\\\/www\\\/owncloud\\\/remote.php(137): require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#8 {main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/owncloud\\\/lib\\\/private\\\/connector\\\/sabre\\\/objecttree.php\",\"Line\":150}","level":4,"time":"2016-01-01T05:11:35+00:00","method":"PROPFIND","url":"\/owncloud\/remote.php\/webdav\/ReadyNAS"}

だんだん見えてきた。エラーの中に「MKCOL」とあるので恐らくWebDAV上でのmkdirに失敗している。試しにWindowsに証明書入れてWebDAVマウントしてフォルダ作ろうとすると失敗する。なんでだ?