Académique Documents
Professionnel Documents
Culture Documents
t=165956
Login
Register
ecotec
8 posts • Page 1 of 1
Posts: 64
Joined: Mon Jul 01, 2013 1:10 pm
Location: Norfolk
Hi,
I'm looking for some help with a mini DLNA setup, I have successfully installed minidlna and edited the config file and it shows up on the network but I cannot see the files to play them.
So far I have:
1 Changed the user to "pi" and "root" in the minidlna config file - resulted in minidlna not being seen on the network despite a force reload.
2 Added minidlna to the pi group (sudo usermod -a G pi minidlna)
3 Checked and double checked the permissions on the external HDD (where the media is located) and all users can access the files.
4 Edited fsab and added a final entry to mount (/dev/sda1 /media/pi/samsung_4tb ext4 defaults 0 2)
Paeryn
Posts: 2527
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England
Is there anything in the log file to give you any clues (/var/log/minidlna.log usually)?
The only thing I can think of for files not showing up could be if the database cache isn't read/writable.
I have minidlna set up to run as user pi and it works fine, I don't have either a user or group called minidlna (then again I compiled it myself, version 1.1.5 rather than 1.1.2 that is on the repo). I don't remember doing anything special bar increasing the number of system inotify watches (and that was only to stop it giving warnings in the log, it wasn't causing any failure).
ecotec
Posts: 64
Joined: Mon Jul 01, 2013 1:10 pm
Location: Norfolk
I've checked all the folder file paths in the conf file
Code:
/var/cache/minidlna
/var/log
(I've also got /var/log/minidlna)
I've checked the permissions and they all look fine and log files are being written - but without much helpful in there.
I copied over a file from the external hard drive to /home/pi/Music and reloaded, the file appeared immediately, so it does look to be a permissions/config issue?
Any ideas?!
Paeryn
Posts: 2527
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England
ecotec wrote:
I've checked all the folder file paths in the conf file
Code:
/var/cache/minidlna
/var/log
(I've also got /var/log/minidlna)
I've checked the permissions and they all look fine and log files are being written - but without much helpful in there.
I copied over a file from the external hard drive to /home/pi/Music and reloaded, the file appeared immediately, so it does look to be a permissions/config issue?
Any ideas?!
If it appears when in /home/pi/Music did you add the hard drive's folder to the search locations? The database cache is obviously fine if it's picking up files from your home directory. My music is stored on a USB drive and it's set to only check there. I can't think of anything else if you aren't getting any errors logged.
ecotec
Posts: 64
Joined: Mon Jul 01, 2013 1:10 pm
Location: Norfolk
Thanks Paeryn
checked the config file again - the /media/pi/samsung_4tb/tv is correct and I can paste it into the file explorer
I've editing fstab and checked the entry, all seems fine (rebooted)
I've followed the advice here: https://everbit.wordpress.com/2013/04/0 ... pberry-pi/ (https://everbit.wordpress.com/2013/04/01/minidlna-on-the-raspberry-pi/)
to edit:
Code:
3. MiniDLNA doesn’t have permissions to view newly created folders in the watched media_dir
I solved this by running MiniDLNA as the user root instead of minidlna. Edit init.d and add USER=root near the top.
sudo nano /etc/init.d/minidlna
USER=root
And User=pi
no change...
What's the best way to check permissions of a drive, groups that can access?
This drive was in use with a pi1, i've moved it over to a pi2 I have spare - is that causing an issue?
1 of 2 6/25/2019, 9:11 PM
HDD permissions and mini DLNA problem - Raspberry Pi Forums https://www.raspberrypi.org/forums/viewtopic.php?t=165956
Thanks!
ecotec
Posts: 64
Joined: Mon Jul 01, 2013 1:10 pm
Location: Norfolk
Log file - is sql.c:41: error: SQL ERROR 8 [attempt to write a readonly database] the issue?
Code:
[2016/11/18 15:12:06] sql.c:41: error: SQL ERROR 8 [attempt to write a readonly database]
.....
[2016/11/18 15:12:36] minidlna.c:1004: warn: Starting MiniDLNA version 1.1.2.
[2016/11/18 15:12:37] minidlna.c:1043: warn: HTTP listening on port 8200
[2016/11/18 15:12:37] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [0] and I do not have permission to increase this limit. Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.
[2016/11/18 15:16:13] minidlna.c:153: warn: received signal 15, good-bye
is low or close to the number of used watches [0] and I do not have permission to increase this limit. Please do so manually by writing a higher value into /proc/sys/fs/inotify/max_user_watches.
Paeryn
Posts: 2527
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England
ecotec wrote:
Log file - is sql.c:41: error: SQL ERROR 8 [attempt to write a readonly database] the issue?
That sounds like SQLite can't write to minidlna's database. Either the user minidlna is being run as doesn't have permission to write to it or the database is locked as readonly. You could always try deleting the database (or just rename/move it incase you need to put it back) and let it recreate a new one (files.db in where ever db_dir= in minidlna.conf points to, mine is /var/cache/minidlna/files.db). I'm not sure how SQLite manages things but
it might have caused issues when you tried changing the user that minidlna runs as.
ecotec
Posts: 64
Joined: Mon Jul 01, 2013 1:10 pm
Location: Norfolk
I've still not fixed these issues despite spending an age trying to so:
I've edited the config file and if I place files on the sd card and add the location
they appear fine and I play them without issue. So minidlna is working - it's just I
can't see the files on the HDD.
I can't seem to get minidlna to run as user pi or root, if I change it just disapears from the
network.
The log is not displaying anything that looks important.
How can I check the permissions of the hard drive so I can provide access for minidlna?
Sort by
Post time
Ascending
Post Reply
8 posts • Page 1 of 1
Return to “Troubleshooting”
Jump to
Board index
All times are UTC
Delete all board cookies
SUBSCRIBE
2 of 2 6/25/2019, 9:11 PM