Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I reinstalled my desktop for Trusty and I installed minidlna.
At Trusty install time I decided to insist in using an internal 1TB SATA drive to store multimedia files for minidlna usage. I had this whole drive formated with 4GB for swap, 5GB for /tmp, 5GB for /var and the remaining 900+GB as an ext4 partition that I specified will be mounted as /srv in the Ubuntu install wizard.
In Precise, I met trouble/puzzle to easily use this.
Now, I created directories:

sudo -i
mkdir -p /srv/minidlna/Movies
mkdir /srv/minidlna/Music
mkdir /srv/minidlna/Pictures

and populated them with a backup copy.

/srv will later also be used to store she and me $HOME weekly backups (deja-dup over ssh) from our respective laptops... just to say it is not really fully dedicated to minidlna.

I have 3 PAM user accounts: me (single administrator in the machine), she, and... kids.
I also have the minidlna service running with default personality (I don't know if I can say it is user minidlna or root, but that don't really matters as I'd rather keep it as is if nobody gives a good advise to change this (#user=minidlna directive)).
In minidlna.conf I would just change the mass-storage target and inotify=yes.
I apply the same 755 minidlna:minidlna permissions/ownership to /srv/minidlna as they are on the /var/lib/minidlna default target:

chown -R minidlna /srv/minidlna
chgrp -R minidlna /srv/minidlna
chmod -R 755 minidlna
service minidlna restart

which ends ~ok~ (roughly translated) in

[2014/07/26 18:28:20] minidlna.c:153: warn: received signal 15, good-bye
[2014/07/26 18:28:21] minidlna.c:1004: warn: Starting MiniDLNA version 1.1.2.
[2014/07/26 18:28:21] minidlna.c:356: warn: New media_dir detected; rescanning...
[2014/07/26 18:28:21] minidlna.c:1043: warn: HTTP listening on port 8200
[2014/07/26 18:28:21] scanner.c:702: warn: Analysing de /srv/minidlna
[2014/07/26 18:29:11] scanner.c:789: warn: Analysing /srv/minidlna ended (2960 files) !
[2014/07/26 18:29:11] playlist.c:125: warn: Parsing playlists...
[2014/07/26 18:29:11] playlist.c:256: warn: Finished parsing playlists.
[2014/07/26 18:29:12] inotify.c:198: warn: WARNING: Inotify max_user_watches [8192] is low or close to the number of used watches [47] 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.

Well, sorry for such a long preamble, now I want all us three me/she/kids to be able to drop files/make dirs/move/del files/dirs into /srv/minidlna/Movies|Music|Pictures easily (and as a bonus prevent deletion of any of the 4 parents), without always have to ask me to do this for obscure permissions restrictions. In the past Precise, the folder was owned by root, group was minidlna and I added us three as members in the group. Maybe chmod was too restrictive, I can't remember, just remember it was boring. Maybe I puzzled/confused myself with primary/secondary groups as I still can't understand how they are imbricated or linked into each other, so that she or kids can move/delete files/folders I dropped/created there in the whole 3 subtrees. Maybe also I was too nasty with removing -R any rwx to Others?

Please what is the good way if any? We are every where advised not to play with umask (whose man is too cryptic to me, whatever).
Thank you so much for reading such a long question, but as it is a security factual example, I believe an answer could be a good training to make me and others, I hope, a little more aware and easy in this matter of privileges.

share|improve this question
Erm - what was your actual issue? Can your DLNA client access the media files (from what we see here it should)? –  Takkat Jul 26 '14 at 21:16
It does. But how do the human beings deal with sharing the job of feeding it? Is my idea of adding human users into minidlna group is the recommended state of the art? –  useful Jul 27 '14 at 10:19
What we do here is we created a shared media directory for all users using ACL, nicely explained here: askubuntu.com/questions/82628/… or (command line) there: askubuntu.com/questions/52584/shared-folders-for-all-users –  Takkat Jul 27 '14 at 10:51
Thank you Takkat, I think your last comment is clear enough to be eligible as an answer. It seems I have a lot to learn, but at least your links expose good context. –  useful Jul 29 '14 at 9:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.