<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="https://dev1galaxy.org/extern.php?action=feed&amp;tid=7721&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Dev1 Galaxy Forum / Bug in MiniDLNA init script: missing chown for db_dir]]></title>
		<link>https://dev1galaxy.org/viewtopic.php?id=7721</link>
		<description><![CDATA[The most recent posts in Bug in MiniDLNA init script: missing chown for db_dir.]]></description>
		<lastBuildDate>Sun, 04 Jan 2026 06:23:51 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Bug in MiniDLNA init script: missing chown for db_dir]]></title>
			<link>https://dev1galaxy.org/viewtopic.php?pid=61089#p61089</link>
			<description><![CDATA[<p>Hi,</p><p>I&#039;ve encountered an issue with the minidlna (ReadyMedia) init script on Devuan (SysVinit). The service fails to rebuild the database when the -R or -r flag is used, resulting in the following error:</p><p>minidlna.c:944: fatal: Failed to clean old file cache /var/cache/minidlna. EXITING</p><p>The Cause: The /etc/init.d/minidlna script correctly handles permissions for the LOGFILE and PIDFILE directories in the do_start() function, but it fails to do the same for the db_dir (default: /var/cache/minidlna). If the directory is owned by root (which happens during some installation scenarios or manual cleanups), the minidlna user cannot delete the old files.db.</p><p>Proposed Fix: In /etc/init.d/minidlna, within the do_start() function, we should ensure the database directory exists and has the correct ownership.</p><p>Currently, it only does:</p><div class="codebox"><pre><code>mkdir -p &quot;$(dirname &quot;$LOGFILE&quot;)&quot; &amp;&amp; chown $USER:$GROUP &quot;$(dirname &quot;$LOGFILE&quot;)&quot; || return 2
mkdir -p &quot;$(dirname &quot;$PIDFILE&quot;)&quot; &amp;&amp; chown $USER:$GROUP &quot;$(dirname &quot;$PIDFILE&quot;)&quot; || return 2</code></pre></div><p>It should also include something like:</p><div class="codebox"><pre><code>mkdir -p /var/cache/minidlna &amp;&amp; chown -R $USER:$GROUP /var/cache/minidlna || return 2</code></pre></div><p>(Note: A more robust approach would be to parse db_dir from /etc/minidlna.conf, but ensuring the default path at least would solve most cases.)</p><p>Without this, any attempt to refresh the library after deleting files (which requires rebuilding the cache) fails silently or crashes the daemon.</p><p>Best regards,</p>]]></description>
			<author><![CDATA[dummy@example.com (maran)]]></author>
			<pubDate>Sun, 04 Jan 2026 06:23:51 +0000</pubDate>
			<guid>https://dev1galaxy.org/viewtopic.php?pid=61089#p61089</guid>
		</item>
	</channel>
</rss>
