Tuesday, September 26, 2023
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 95195  / 2 Years ago, sat, september 11, 2021, 2:11:33

I have a secondary hard drive that is mounted as /media/Media and I would like to user a folder called Videos located on that drive that I would like to share the videos located on this folder out via minidlna.
I have minidlna working with /home/jonathan/Videos which is on my smaller drive and would like to instead move the videos to the larger drives.



However after I edit my minidlna.conf to point to the /media/Media/Videos folder and do a sudo service minidlna force-reload to reload the database I get a permssions error.



Can someone point me to the correct permissions I need to set on this folder?


More From » permissions

 Answers
4

I tried following the examples in this thread but still could not get it to work. I ended up stumbling on this article here: Running minidlna on Ubuntu and followed it step by step and I now have the media on my second drive being served through minidnla. If any one else struggles I suggest you follow his process.



I have quoted his text in case his page ever disappears.






He installed a service called minidlna which is supposed to allow streaming of media. However, it didn’t like the permissions on his chosen folder.
The path is /media/jw/drive2/foo.



jw@FooPC:~$ sudo service minidlna restart
* Restarting DLNA/UPnP-AV media server minidlna
[2014/07/23 21:03:30] minidlna.c:594: error: Media directory "/media/jw/drive2/foo" not accessible [Permission denied]


He pointed it to a folder in his home folder and it liked that just fine, but not the 2nd drive that holds the media.



He tried setting the user as me in the conf file and in the default file. But eventually He discovered he had to set the user as “root” to make it work.



He opened terminal and entered ...



sudo gedit /etc/default/minidlna


...and edited the file...



# User and group the daemon should run as
USER=”root”
#GROUP=”minidlna”


...then saved and back to terminal and entered...



sudo gedit /etc/minidlna.conf


... and edited the file...



# Specify the user name or uid to run as.
user=root


He restarted the service using...



sudo service minidlna restart


... in terminal and this time there was no error about permissions.






I hope that helps someone as it helped me. If it helps you then please visit his page and leave him a comment like I did so he knows that his page is helping!



UPDATE:



This works straight away but if you power off the machine and then restart it the second drive is not served by the minidnla server until you run:



sudo service minidlna restart


Getting it to work from bootup is a user-mode drive problem and can be fixed by adding the drive to fstab. The downside is that the system will not boot automatically if the drive is not plugged in, as it will annoyingly demand to retry or ignore before continuing to boot.



An alternative to adding the drive to fstab is to restart the minidlna service at reboot from cron:



sudo crontab -e


then add the next line at the end of the file:



@reboot sleep 60 && sudo service minidlna restart

[#32284] Sunday, September 12, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tisglitter

Total Points: 307
Total Questions: 103
Total Answers: 119

Location: Bosnia and Herzegovina
Member since Thu, Jun 24, 2021
2 Years ago
tisglitter questions
Sun, Jan 9, 22, 16:18, 2 Years ago
Tue, Jan 10, 23, 00:08, 9 Months ago
Wed, Jun 1, 22, 18:03, 1 Year ago
Fri, Dec 10, 21, 14:31, 2 Years ago
;