Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
minidlna cannot access directory - Rechteproblem
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Feb 27, 2015 10:41 pm    Post subject: minidlna cannot access directory - Rechteproblem Reply with quote

Guten Abend,

ich hab grad auf meiner Nas Minidlna installiert. Beim Starten (Systemd) krieg ich jedoch die Fehlermeldungen:

Code:
Feb 27 23:36:19 Nas systemd[1]: Starting minidlna server...
Feb 27 23:36:19 Nas systemd[1]: Started minidlna server.
Feb 27 23:36:19 Nas minidlnad[21652]: [2015/02/27 23:36:19] minidlna.c:611: error: Media directory "V,/home/sm/Daten/Videos" not accessible [Keine Berechtigung]
Feb 27 23:36:19 Nas minidlnad[21652]: [2015/02/27 23:36:19] minidlna.c:611: error: Media directory "V,/home/sm/Daten/Downloads/Filme" not accessible [Keine Berechtigung]
Feb 27 23:36:19 Nas minidlnad[21652]: [2015/02/27 23:36:19] minidlna.c:611: error: Media directory "A,/home/sm/Daten/Downloads/Musik" not accessible [Keine Berechtigung]
Feb 27 23:36:19 Nas minidlnad[21652]: [2015/02/27 23:36:19] minidlna.c:611: error: Media directory "/home/sm/Daten/Downloads/Pyload" not accessible [Keine Berechtigung]
Feb 27 23:36:19 Nas minidlnad[21652]: minidlna.c:939: error: MiniDLNA is already running. EXITING.
Feb 27 23:36:19 Nas systemd[1]: minidlna.service: main process exited, code=exited, status=1/FAILURE
Feb 27 23:36:19 Nas systemd[1]: Unit minidlna.service entered failed state.
Feb 27 23:36:19 Nas systemd[1]: minidlna.service failed.


Gut jetzt denkt man sich, ein paar Berechtigungen anpassen sollte ja nicht das Problem sein.

Minidlna läuft selbst unter dem Nutzer minidlna
ps aux | grep minidlna:
minidlna  4365  0.0  1.6  57268  8196 ?        Ssl  23:06   0:00 minidlnad -R


id minidlna:
uid=995(minidlna) gid=995(minidlna) Gruppen=995(minidlna)


Meine Medienverzeichnisse sind mit 755, die Dateien mit 644 gesetzt.

la /home/sm/Daten/Videos/:

insgesamt 176580
drwxr-xr-x  3 sm users      4096 30. Sep 20:53 .
drwxr-xr-x 12 sm users      4096 13. Feb 14:05 ..
drwxr-xr-x  2 sm users      4096 30. Sep 20:56 Galinha Pintadinha
-rw-r--r--  1 sm users 180804703 30. Sep 20:50 Lalelu.mkv

Der Verzeichnisbaum bis hoch zum / hat auch immer 755.

Die Systemd-Unit, falls das nicht noch ausgeschlossen werden kann:
/usr/lib/systemd/system/minidlna.service:

[Unit]
Description=minidlna server
After=network.target

[Service]
Type=simple
User=minidlna
Group=minidlna
ExecStart=/usr/bin/minidlnad -S
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on

[Install]
WantedBy=multi-user.target


Selbst wenn ich jetzt eins der Verzeichnisse auf 777 und User minidlna:minidlna setz, kommt die Meldung über fehlende Berechtigungen.

An welchem Recht scheitert es jetzt?
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Feb 27, 2015 11:07 pm    Post subject: Reply with quote

Ok, ich glaub, ich hab's hinbekommen. Es scheint wohl irgendwie am "Systemd-Modus" zu liegen.

minidlnad --help:
        -S changes behaviour for systemd


Keine Ahnung, was das genau bedeutet. Soweit ich weiß, will Systemd gern alle Daemons selbst verwalten. Deswegen sollten sämtliche Dienste nicht mehr selbst im Daemon-Modus laufen.

Ich hab die Unit jetzt mal geändert:

/etc/systemd/system/minidlna.service:
[Unit]
Description=minidlna server
After=network.target

[Service]
Type=forking
User=minidlna
Group=minidlna
ExecStart=/usr/bin/minidlnad
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on

[Install]
WantedBy=multi-user.target


Und jetzt geht's auf einmal problemlos.
Back to top
View user's profile Send private message
musv
Advocate
Advocate


Joined: 01 Dec 2002
Posts: 3337
Location: de

PostPosted: Fri Feb 27, 2015 11:19 pm    Post subject: Reply with quote

Nächste Update:

Ich hab jetzt versucht rauszufinden, warum irgendwas nicht funktioniert und bin gescheitert. Mittlerweile geht auch die originale minidlna.service.

Systemd halt :roll:

Auch sind die Optionen

Code:
ProtectSystem=full
ProtectHome=on
PrivateDevices=on
NoNewPrivileges=on


nicht wirklich dokumentiert.

Update:
Ich glaub, es funktioniert jetzt deswegen, da ich nicht mehr auf ein Unterverzeichnis eines Home-Verzeichnisses zugreif, sondern die freizugebenden Verzeichnisse aus dem NFS-Export-Bind (/export/daten/...) verwende. Könnte u.U. an ProtectHome liegen.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum