<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nextcloud &#8211; 寂静花园</title>
	<atom:link href="https://www.addesp.com/archives/category/%E7%AC%94%E8%AE%B0/nextcloud/feed" rel="self" type="application/rss+xml" />
	<link>https://www.addesp.com</link>
	<description>寂静中交织着热情</description>
	<lastBuildDate>Sat, 05 Jun 2021 04:07:42 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.2</generator>
	<item>
		<title>Nextcloud 423 Locked</title>
		<link>https://www.addesp.com/archives/4589</link>
					<comments>https://www.addesp.com/archives/4589#comments</comments>
		
		<dc:creator><![CDATA[ADD-SP]]></dc:creator>
		<pubDate>Sat, 05 Jun 2021 04:07:42 +0000</pubDate>
				<category><![CDATA[Nextcloud]]></category>
		<category><![CDATA[故障排除]]></category>
		<guid isPermaLink="false">https://www.addesp.com/?p=4589</guid>

					<description><![CDATA[概述 Nextcloud 中对文件进行修改、删除操作会失败。网页端显示错误，客户端显示返回 HTTP 423  [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h2 class="wp-block-heading">概述</h2>



<p class="wp-block-paragraph">Nextcloud 中对文件进行修改、删除操作会失败。网页端显示错误，客户端显示返回 HTTP 423 (Locked) 状态码。</p>



<blockquote class="wp-block-quote is-layout-flow wp-block-quote-is-layout-flow"><p>HTTP 423 状态码并未定义在 HTTP 标准中。其定义在 <a href="https://datatracker.ietf.org/doc/html/rfc4918#page-78" target="_blank" rel="noreferrer noopener" title="https://datatracker.ietf.org/doc/html/rfc4918#page-78">RFC 4918</a> 中作为 HTTP 协议的一个扩展。</p><cite><a href="https://datatracker.ietf.org/doc/html/rfc4918" target="_blank" rel="noreferrer noopener" title="https://datatracker.ietf.org/doc/html/rfc4918">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)  &#8212; RFC 4918</a></cite></blockquote>



<h2 class="wp-block-heading">系统环境</h2>



<h3 class="wp-block-heading">宿主机</h3>



<ul class="wp-block-list"><li>OS：Ubuntu 20.04</li><li>Server：nginx-1.21.0</li><li>MySQL：8.0.25</li><li>Nextcloud：21.0.0</li></ul>



<h3 class="wp-block-heading">Docker</h3>



<ul class="wp-block-list"><li>php:8.07-fpm-alpine3.13</li></ul>



<h2 class="wp-block-heading">解决方法</h2>



<h3 class="wp-block-heading">临时解决</h3>



<ol class="wp-block-list"><li>开启维护模式，详见<a href="https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html" target="_blank" rel="noreferrer noopener" title="https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html">官方文档</a>。</li><li>清空数据库中的表  <code>oc_file_locks</code>。<strong><span class="has-inline-color has-vivid-red-color">不是删除表！</span></strong></li><li>关闭维护模式。</li><li>确保你的后台任务能够正常执行，后台任务在「设置 -> 基本设置」中查看。</li></ol>



<h3 class="wp-block-heading">一劳永逸</h3>



<ul class="wp-block-list"><li>如果你可以控制 Nextcloud 所在服务器，建议为 Nextcloud 配置 Redis 缓存。配置方法见<a href="https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html?highlight=cache" target="_blank" rel="noreferrer noopener" title="https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/caching_configuration.html?highlight=cache">官方文档</a>。</li><li>如果你不能为 Nextcloud 配置 Redis 缓存，你可以关闭文件锁定。修改 <code>config/config.php</code> 文件，写入 <code>'filelocking.enabled' => false</code>。</li></ul>



<p class="wp-block-paragraph">关闭文件锁定可能会导致并发状态下对文件的操作出错，比如造成文件内容混乱或损坏。</p>



<h2 class="wp-block-heading">参考资料</h2>



<ul class="wp-block-list"><li><a href="https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883" target="_blank" rel="noreferrer noopener" title="https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883">File is locked &#8211; how to unlock &#8211; <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4d1.png" alt="📑" class="wp-smiley" style="height: 1em; max-height: 1em;" /> How to &#8211; Nextcloud community</a></li></ul>
]]></content:encoded>
					
					<wfw:commentRss>https://www.addesp.com/archives/4589/feed</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
	</channel>
</rss>
