<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Nextcloud on inetshell</title><link>https://inet.sh/en/posts/nextcloud/</link><description>Recent content in Nextcloud on inetshell</description><generator>Hugo</generator><language>en</language><lastBuildDate>Sat, 26 Sep 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://inet.sh/en/posts/nextcloud/index.xml" rel="self" type="application/rss+xml"/><item><title>Nextcloud: 'will not be accessible due to incompatible encoding' (files invisible because of NFD or Latin-1 names)</title><link>https://inet.sh/en/posts/nextcloud/incompatible-encoding-nfc-convmv/</link><pubDate>Sat, 26 Sep 2026 00:00:00 +0000</pubDate><guid>https://inet.sh/en/posts/nextcloud/incompatible-encoding-nfc-convmv/</guid><description>occ files:scan warns &amp;#39;will not be accessible due to incompatible encoding&amp;#39; and files with accents or ñ never show up in Nextcloud or ownCloud. They are Unicode NFD names (macOS, SMB) or ISO-8859-1 names (old Windows) copied straight into the data directory. Fix with convmv --nfc or -f iso-8859-1, files:scan, and how to keep it from coming back with rsync --iconv and Samba.</description><content:encoded><![CDATA[<h2 id="tldr">TL;DR</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt"> 1
</span><span class="lnt"> 2
</span><span class="lnt"> 3
</span><span class="lnt"> 4
</span><span class="lnt"> 5
</span><span class="lnt"> 6
</span><span class="lnt"> 7
</span><span class="lnt"> 8
</span><span class="lnt"> 9
</span><span class="lnt">10
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-shell" data-lang="shell"><span class="line"><span class="cl">apt install convmv                                   <span class="c1"># dnf install convmv</span>
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 1. See what would be renamed (without --notest, convmv only simulates)</span>
</span></span><span class="line"><span class="cl">convmv -f utf-8 -t utf-8 -r --nfc /var/www/nextcloud/data/alice/files
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 2. Apply</span>
</span></span><span class="line"><span class="cl">convmv -f utf-8 -t utf-8 -r --notest --nfc /var/www/nextcloud/data/alice/files
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl"><span class="c1"># 3. Have Nextcloud index again</span>
</span></span><span class="line"><span class="cl">sudo -u www-data php occ files:scan --all
</span></span></code></pre></td></tr></table>
</div>
</div><p>If the names come from an old Windows or Samba and are not even UTF-8 (<code>convmv</code> flags them as <em>not UTF-8</em>): <code>convmv -f iso-8859-1 -t utf-8 -r --notest &lt;path&gt;</code>.</p>
<p>On Docker, <code>occ</code> runs inside the container: <code>docker exec -u www-data nextcloud php occ files:scan --all</code> (on the linuxserver.io image, <code>sudo -u abc php /config/www/nextcloud/console.php files:scan --all</code>).</p>
<h2 id="the-error">The error</h2>
<div class="highlight"><div class="chroma">
<table class="lntable"><tr><td class="lntd">
<pre tabindex="0" class="chroma"><code><span class="lnt">1
</span></code></pre></td>
<td class="lntd">
<pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="cl">Entry &#34;Ñandú y Ñoño.pdf&#34; will not be accessible due to incompatible encoding
</span></span></code></pre></td></tr></table>
</div>
</div><p><code>occ files:scan</code> prints it. The files are on disk, <code>ls</code> shows them, but they do not appear on the web, do not sync, and do not count towards quota. It shows up almost always after copying data <strong>straight into the data directory</strong> (migrations, <code>rsync</code> from a Mac, an SMB share mounted as <em>external storage</em>) instead of uploading through the client.</p>
<h2 id="why-it-happens">Why it happens</h2>
<p>Unicode allows writing &ldquo;ñ&rdquo; two ways: precomposed (<strong>NFC</strong>, a single code point) or decomposed (<strong>NFD</strong>, an &ldquo;n&rdquo; plus a combining tilde). They look identical and are different bytes. macOS has historically stored names in NFD (HFS+ forced it; APFS and Finder still produce them when copying over SMB or <code>rsync</code>); Linux and Nextcloud work in NFC. Nextcloud normalizes every name to NFC and discards the ones it cannot match with what is on disk, hence the warning.</p>
<p>The other case is older: <strong>ISO-8859-1</strong> (Latin-1) names inherited from Windows or from a Samba without <code>unix charset = UTF-8</code>. They are not valid UTF-8 and Nextcloud does not accept them either.</p>
<h2 id="the-fix-calmly">The fix, calmly</h2>
<ol>
<li><strong>Maintenance mode</strong> so no client syncs halfway: <code>occ maintenance:mode --on</code>.</li>
<li><strong>Simulate</strong>: <code>convmv</code> without <code>--notest</code> lists every rename it would do. If files show up as <em>not UTF-8</em>, those go with <code>-f iso-8859-1</code>.</li>
<li><strong>Apply</strong> with <code>--notest</code>. If the NFC twin already exists (the same name uploaded twice), <code>convmv</code> skips it and warns; <code>--replace</code> overwrites, so decide beforehand which one is the good one.</li>
<li><strong><code>occ files:scan --all</code></strong> (or <code>--path=/alice/files/Photos</code> for one user or folder). The warning goes away and the files enter the index.</li>
<li><code>occ maintenance:mode --off</code>.</li>
</ol>
<p><code>convmv</code> renames with <code>rename()</code>: it keeps owner, permissions, and dates, and it is instant even with hundreds of thousands of files.</p>
<h2 id="keeping-it-from-coming-back">Keeping it from coming back</h2>
<ul>
<li><strong>From macOS, upload with the Nextcloud client</strong>, which normalizes to NFC. If you copy with <code>rsync</code>, <code>--iconv=utf-8-mac,utf-8</code> converts the names in flight.</li>
<li><strong>Samba</strong> as a bridge: <code>vfs objects = fruit</code> with <code>fruit:encoding = native</code> does the conversion for Mac clients; and <code>unix charset = UTF-8</code> always.</li>
<li><strong>External storage SMB/local</strong>: fix the names at the source; Nextcloud does not rename what it cannot index.</li>
</ul>
<h2 id="traps">Traps</h2>
<ul>
<li><strong><code>--notest</code> is what applies.</strong> The opposite of what one expects: by default <code>convmv</code> is a dry run.</li>
<li><strong>Renaming changes the <code>fileid</code>.</strong> For Nextcloud, the NFD file disappears and an NFC one is born: shared links, comments, and versions of those files are lost. Warn the affected users first.</li>
<li><strong>ownCloud</strong> behaves the same and has the same <code>occ</code>.</li>
<li><strong>MySQL databases with 3-byte <code>utf8</code></strong> give a similar but different error (emoji and CJK): there it is <code>occ db:convert-mysql-charset</code>, not <code>convmv</code>.</li>
</ul>
<p>See also: <a href="/en/posts/seafile/reclaim-disk-space-seaf-gc/">Seafile: reclaim space with seaf-gc</a> and <a href="/en/posts/linux/rsync-resume-large-transfers/">rsync: resume large transfers</a> (the <code>--iconv</code>). Reference: <a href="https://help.nextcloud.com/t/will-not-be-accessible-due-to-incompatible-encoding/86612">thread on help.nextcloud.com</a>.</p>
]]></content:encoded></item></channel></rss>