Quantcast
Channel: PirateBox Forum - Raspberry Pi(rate)Box
Viewing all articles
Browse latest Browse all 1863

Fix for droopy and minidlna

$
0
0
Following my post about minidlna permission issue, I have found out that dropped file via the upload feature of Piratebox (into /opt/piratebox/share/Shared) have by default permission -rw-------.

This make those files unreadable by minidlna, and minidlna can not update, nor provide the newly dropped files.

So minidlna is still broken, even if you have taken care of the permission issue mentionned elsewhere.

Here is the fix for this:
--- /opt/piratebox/bin/droopy	2015-06-19 11:33:20.216375704 +0000
+++ /opt/piratebox/bin/droopy.2	2015-06-19 11:33:30.306281245 +0000
@@ -918,6 +918,7 @@
                 fout = file(localpath, 'wb')
                 shutil.copyfileobj(fileitem.file, fout)
                 fout.close()
+            os.chmod(localpath, 0644)
             self.log_message("Received: %s", os.path.basename(localpath))
 
             # -- Reply
This will add one line in droopy to automatically change permission on dropped file to world-readable. That way minidlna will notice the file, read it and update its database, and provides the newly dropped file.

By the way, what have you done to droopy file ? This is an utf-8 encoded file. This is important for the localised string and translation in the file. But you have managed to mess it up and now it's garbage. Instead of getting a nice 'Fichier reçu' when I drop a file I got a weird character... I don't even talk about korean or chinese where it should be garbage and unreadable...

Viewing all articles
Browse latest Browse all 1863

Trending Articles