Bug 198409 - net/minidlna 1.1.4_1,1 "upnphttp.c:1909 Error opening ..." at boot and no error after "restart"
Summary: net/minidlna 1.1.4_1,1 "upnphttp.c:1909 Error opening ..." at boot and no err...
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Walter Schwarzenfeld
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-08 08:59 UTC by olivier
Modified: 2019-08-14 15:57 UTC (History)
1 user (show)

See Also:


Attachments
pach to read files UID and GID from inside the program (1.70 KB, patch)
2015-03-08 08:59 UTC, olivier
no flags Details | Diff
Extract from the log file (6.48 KB, text/plain)
2015-03-08 09:02 UTC, olivier
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description olivier 2015-03-08 08:59:54 UTC
Created attachment 153991 [details]
pach to read files UID and GID from inside the program

When minidlna starts as a normal user (ie not root) at boot, it can't access files on the disk. It issues the following errors in log file:
"upnphttp.c:1909 Error opening </path/filename>".

When i restart the program manually "service minidlna restart", it can access files without any problem.

I tried to pin point the problem, by installing the ports and modifying the source code. see <patch-debug_fork-upnphttp>.

It appears, the error description is [Permission denied].
When i ask for file UID and GID from inside the process (thanks to the patch), it returns obviously wrong values (see <minidlna.log> for more details):

UID of file 808277513
GID of file 0
OR
UID of file 0
GID of file 24

whereas they should be (like after restart)

UID of file 2001
GID of file 1001
 See below extract from "minidlna.log": -------------

BEFORE RESTART
[2015/03/07 19:32:19] upnphttp.c:1910: error: Starting debug on file /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 ----------------
[2015/03/07 19:32:19] upnphttp.c:1912: error: Real UID of the process 2002
[2015/03/07 19:32:19] upnphttp.c:1913: error: Real GID of the process 0
[2015/03/07 19:32:19] upnphttp.c:1914: error: Effective UID of the process 2002
[2015/03/07 19:32:19] upnphttp.c:1915: error: Effective GID of the process 0
[2015/03/07 19:32:19] upnphttp.c:1921: error: Mode of file 30357
[2015/03/07 19:32:19] upnphttp.c:1922: error: UID of file 808277513
[2015/03/07 19:32:19] upnphttp.c:1923: error: GID of file 0
[2015/03/07 19:32:19] upnphttp.c:1929: error: Error opening for READ /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:32:19] upnphttp.c:1930: error: Error opening for WRITE /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:32:19] upnphttp.c:1931: error: Error opening for EXEC /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:32:19] upnphttp.c:1937: error: Error opening /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]

AFTER RESTART
[2015/03/07 19:35:11] upnphttp.c:1930: error: Error opening for WRITE /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:35:11] upnphttp.c:1931: error: Error opening for EXEC /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:35:11] upnphttp.c:1910: error: Starting debug on file /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 ----------------
[2015/03/07 19:35:11] upnphttp.c:1912: error: Real UID of the process 2002
[2015/03/07 19:35:11] upnphttp.c:1913: error: Real GID of the process 0
[2015/03/07 19:35:11] upnphttp.c:1914: error: Effective UID of the process 2002
[2015/03/07 19:35:11] upnphttp.c:1915: error: Effective GID of the process 0
[2015/03/07 19:35:11] upnphttp.c:1921: error: Mode of file 33184
[2015/03/07 19:35:12] upnphttp.c:1922: error: UID of file 2001
[2015/03/07 19:35:12] upnphttp.c:1923: error: GID of file 1001 
[2015/03/07 19:35:12] upnphttp.c:1930: error: Error opening for WRITE /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
[2015/03/07 19:35:12] upnphttp.c:1931: error: Error opening for EXEC /daemonpool/daemonfs/video/court-metrage/7-35 In The Morning (SD).mp4 [Permission denied]
Comment 1 olivier 2015-03-08 09:02:08 UTC
Created attachment 153992 [details]
Extract from the log file
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2015-03-08 18:45:37 UTC
Fix Summary and assign.
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-01-11 19:59:13 UTC
Maintainer timeout?
Comment 4 Gleb Smirnoff freebsd_committer freebsd_triage 2019-01-09 04:04:32 UTC
Can you please check if the problem can be reproduced with newer minidlna version that is now in ports?
Comment 5 Walter Schwarzenfeld freebsd_triage 2019-08-14 15:57:21 UTC
We have version 1.2.1 and reporter feedback timeout.

If there problems with this version, please reopen.