Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 212840 - net-dns/ddclient fails to start, permission denied to conf file
Summary: net-dns/ddclient fails to start, permission denied to conf file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Thomas Anderson (tanderson) (RETIRED)
URL:
Whiteboard:
Keywords:
: 212841 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-09 16:51 UTC by Tiago Marques
Modified: 2011-08-12 12:30 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ddclient.initd.patch (ddclient.initd.patch,313 bytes, text/plain)
2008-03-21 05:29 UTC, Tim Harder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Marques 2008-03-09 16:51:46 UTC
ARNING:  file /etc/ddclient/ddclient.conf: Cannot open file '/etc/ddclient/ddclient.conf'. (Permission denied)
stat() on closed filehandle FD at /usr/sbin/ddclient line 879.
Use of uninitialized value in bitwise and (&) at /usr/sbin/ddclient line 880.
readline() on closed filehandle FD at /usr/sbin/ddclient line 886.
WARNING:  file /etc/ddclient/ddclient.conf: Cannot open file '/etc/ddclient/ddclient.conf'. (Permission denied)
stat() on closed filehandle FD at /usr/sbin/ddclient line 879.
Use of uninitialized value in bitwise and (&) at /usr/sbin/ddclient line 880.
readline() on closed filehandle FD at /usr/sbin/ddclient line 886.
WARNING:  unable to determine IP address

Reproducible: Always

Actual Results:  
service ddclient doesn't start, ddclient on it's own does.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-09 19:21:51 UTC
*** Bug 212841 has been marked as a duplicate of this bug. ***
Comment 2 Tim Harder gentoo-dev 2008-03-21 05:27:09 UTC
I ran into the same problem awhile back and fixed it by removing one line from the init file. See the attached patch for the change.
Comment 3 Tim Harder gentoo-dev 2008-03-21 05:29:31 UTC
Created attachment 146734 [details]
ddclient.initd.patch

ddclient init patch
Comment 4 Thomas Tuegel 2008-09-07 03:59:16 UTC
This seems to be due to the file /etc/ddclient/ddclient.conf not being owned by root:ddclient, since the initscript has ddclient drop root permissions and run as user ddclient.  The conf file should then have group read permissions, as explained in the ddclient ebuild.  Can you verify the ownership of /etc/ddclient/ddclient.conf and try the default initscript again?  This is more secure than running ddclient as root.
Comment 5 Torsten Martin 2008-10-15 14:26:59 UTC
Same Problem here. 

$ ls -l /etc/ddclient
insgesamt 4
-rw-r----- 1 root ddclient 1247  7. Okt 10:55 ddclient.conf

at "# /etc/init.d/ddclient start" I get exactly the same error like in the bug description.
Comment 6 Tiago Marques 2008-10-15 14:33:35 UTC
"This seems to be due to the file /etc/ddclient/ddclient.conf not being owned by
root:ddclient, since the initscript has ddclient drop root permissions and run
as user ddclient.  The conf file should then have group read permissions, as
explained in the ddclient ebuild.  Can you verify the ownership of
/etc/ddclient/ddclient.conf and try the default initscript again?  This is more
secure than running ddclient as root."

Torsten, test this, if you can.
Best regards
Comment 7 Torsten Martin 2008-10-15 15:06:18 UTC
I did:
>> $ ls -l /etc/ddclient
>> insgesamt 4
>> -rw-r----- 1 root ddclient 1247  7. Okt 10:55 ddclient.conf
/etc/ddclient/ddclient.conf is owned by root:ddclient and has group read permissions.
I never altered the initscript.
Comment 8 nowinter 2010-01-07 21:53:10 UTC
guess it's the other way round: ddclient:root, ie
> ls -lh /etc/ddclient/ddclient.conf
-rw-r----- 1 ddclient root 5.1K Jan  7 23:41 /etc/ddclient/ddclient.conf

i had the same err and the made a chown ddclient on that conf file
and then /etc/init.d/ddclient ran ok
Comment 9 Aaron W. Swenson gentoo-dev 2011-08-12 12:30:58 UTC
  12 Aug 2011; Aaron W. Swenson <titanofold@gentoo.org> +ddclient-3.8.1.ebuild,
  +files/ddclient.initd-r1, metadata.xml:
  Version bump. Fixes bugs 186271, 212840, 296598 and 373183