{"id":645,"date":"2018-03-19T07:32:13","date_gmt":"2018-03-19T07:32:13","guid":{"rendered":"https:\/\/tech-tipps.de\/?p=645"},"modified":"2018-03-19T07:32:13","modified_gmt":"2018-03-19T07:32:13","slug":"howto-owncloud-datei-sperre-aufheben","status":"publish","type":"post","link":"https:\/\/tech-tipps.de\/?p=645","title":{"rendered":"HowTo: OwnCloud Datei-Sperre aufheben"},"content":{"rendered":"<div class=\"pntrst_main_before_after\"><\/div><p>Hallo allerseits,<\/p>\n<p>heute habe ich ein kleines HowTo bez\u00fcglich der Sperrung von Dateien in OwnCloud.<\/p>\n<p>OwnCloud ist ein Cloud-Dateisystem f\u00fcr Self-Hosted-Internet-Server; also eine Online-Speicher f\u00fcr die, die Ihren eigenen Internet-Server betreiben.<\/p>\n<p>Hier kann es passieren, dass eine Datei gesperrt wird (weil sie gerade in Benutzung ist) und diese Sperrung nicht mehr automatisch aufgehoben wird.<br \/>\nBeim n\u00e4chsten Versuch die Datei zu bearbeiten\/umzubenennen\/l\u00f6schen bekommt man dann eine Fehlermeldung die in etwa so aussieht:<code><\/code><\/p>\n<pre><code>{\"reqId\":\"0DijSqEkfOg2iyh9VD8J\",\"remoteAddr\":\"xx.xx.xx.xx\",\"app\":\"webdav\",\"message\":\"Exception:\r\n {\\\"Message\\\":\\\"HTTP\\\\\\\/1.1 423 \\\\\\\"path\\\\\\\/file.extension\\\\\\\" is \r\nlocked\\\",\\\"Exception\\\":\\\"OCA\\\\\\\\DAV\\\\\\\\Connector\\\\\\\\Sabre\\\\\\\\Exception\\\\\\\\FileLocked\\\",\\\"Code\\\":0,\\\"Trace\\\":\\\"#0<\/code><\/pre>\n<p>Hierzu gibt der Hersteller (OwnCloud) folgende L\u00f6sungsvorschl\u00e4ge:<\/p>\n<p><strong>Manually disable locking state:<\/strong><\/p>\n<ul>\n<li>put ownCloud in maintenance mode: edit <code>config\/config.php<\/code> and change this line:<br \/>\n<code>'maintenance' =&gt; true,<\/code><\/li>\n<li>Empty table <code>oc_file_locks<\/code>: Use tools such as phpmyadmin or connect directly to your database and run:<br \/>\n<code>DELETE FROM oc_file_locks WHERE 1<\/code><\/li>\n<li>disable maintenance mode (undo first step).<\/li>\n<\/ul>\n<p><strong>Automatically reset locking state:<\/strong><br \/>\nNormally ownCloud should reset the locked state on its own via background jobs. So make sure your cron-jobs run properly (you admin page tells you when cron ran the last time): <a href=\"https:\/\/doc.owncloud.org\/server\/9.0\/admin_manual\/configuration_server\/background_jobs_configuration.html\">https:\/\/doc.owncloud.org\/server\/9.0\/admin_manual\/configuration_server\/background_jobs_configuration.html<span class=\"badge badge-notification clicks\" title=\"2751 clicks\">2.8k<\/span><\/a><\/p>\n<p><strong>Permanent solution (if it happens regularly)<\/strong><\/p>\n<ul>\n<li>on your <strong>own server<\/strong>: Use redis for this feature. It is faster and so far no problems have been reported. You can follow the instructions for memory-caching in the docs: <a href=\"https:\/\/doc.owncloud.org\/server\/9.0\/admin_manual\/configuration_server\/caching_configuration.html#id4\">https:\/\/doc.owncloud.org\/server\/9.0\/admin_manual\/configuration_server\/caching_configuration.html#id4<span class=\"badge badge-notification clicks\" title=\"2086 clicks\">2.1k<\/span><\/a><\/li>\n<li><strong>Shared hosting<\/strong> (others who can&#8217;t install redis): You can disable the file locking, edit your configuration file <code>config\/config.php<\/code>:<br \/>\n<code>'filelocking.enabled' =&gt; false,<\/code><\/li>\n<li>Disabling is no solution. If you really need a real solution, please report this error to the bugtracker (<a href=\"https:\/\/github.com\/owncloud\/core\/issues\">https:\/\/github.com\/owncloud\/core\/issues<span class=\"badge badge-notification clicks\" title=\"116 clicks\">116<\/span><\/a>). Or join the existing discussion (if the error matches): <a href=\"https:\/\/github.com\/owncloud\/core\/issues\/20380\">https:\/\/github.com\/owncloud\/core\/issues\/20380<span class=\"badge badge-notification clicks\" title=\"254 clicks\">254<\/span><\/a><\/li>\n<\/ul>\n<div class=\"pntrst_main_before_after\"><\/div><div class=\"fcbkbttn_buttons_block\" id=\"fcbkbttn_left\"><div class=\"fcbkbttn_like \"><fb:like href=\"https:\/\/tech-tipps.de\/?p=645\" action=\"like\" colorscheme=\"light\" layout=\"standard\"  width=\"450px\" size=\"small\"><\/fb:like><\/div><div class=\"fb-share-button  \" data-href=\"https:\/\/tech-tipps.de\/?p=645\" data-type=\"button_count\" data-size=\"small\"><\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Hallo allerseits, heute habe ich ein kleines HowTo bez\u00fcglich der Sperrung von Dateien in OwnCloud. OwnCloud ist ein Cloud-Dateisystem f\u00fcr Self-Hosted-Internet-Server; also eine Online-Speicher f\u00fcr die, die Ihren eigenen Internet-Server betreiben. Hier kann es passieren, dass eine Datei gesperrt wird (weil sie gerade in Benutzung ist) und diese Sperrung nicht mehr automatisch aufgehoben wird. Beim &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tech-tipps.de\/?p=645\" class=\"more-link\"><span class=\"screen-reader-text\">\u201eHowTo: OwnCloud Datei-Sperre aufheben\u201c <\/span>weiterlesen<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-645","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/645","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=645"}],"version-history":[{"count":1,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/645\/revisions"}],"predecessor-version":[{"id":646,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=\/wp\/v2\/posts\/645\/revisions\/646"}],"wp:attachment":[{"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=645"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=645"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tech-tipps.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=645"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}