Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26311 - wvdial & pon write to /etc/ppp/resolv.conf, hostnames cannot be resolved
Summary: wvdial & pon write to /etc/ppp/resolv.conf, hostnames cannot be resolved
Status: RESOLVED DUPLICATE of bug 37886
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Martin Schlemmer (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-09 19:26 UTC by Steve Hudson
Modified: 2005-07-17 13:06 UTC (History)
3 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Hudson 2003-08-09 19:26:17 UTC
When I try to connect with to the internet, wvdial and pon write to
/etc/ppp/resolv.conf.  Applications cannot resolve hostnames.  They should be
writing to /etc/resolv.conf

Reproducible: Always
Steps to Reproduce:
1. wvdial
2. (or) pon uwo
3.

Actual Results:  
Modem dials and connects properly, but no internet applications can resolve
hostnames.  the file /etc/ppp/resolv.conf has been changed instead of
/etc/resolv.conf

Expected Results:  
Working internet.  (kppp works fine)

Have been forced to use kppp for a long time until I discovered why wvdial or
pon don't work.  As a temporary fix did:
# rm /etc/ppp/resolv.conf
# ln -s /etc/resolv.conf /etc/ppp/resolv.conf
Comment 1 Tom Payne (RETIRED) gentoo-dev 2003-08-30 23:35:46 UTC
I think the problem is that /etc/resolv.conf has permissions 640, which means normal users can't read it, so they can't find any DNS servers, so host names lookups fail.

chmod 644 /etc/resolv.conf after /etc/init.d/net.ppp0 start fixes it, but is annoying.

I've no idea at all why /etc/init.d/net.ppp0 makes /etc/resolv.conf mode 640 (it does so explicitly -- something to with kppp?)

Martin, please edit /etc/init.d/net.ppp0 so the /etc/resolv.conf permissions get set correctly.

Thanks.

Tom
Comment 2 Octavio Ruiz (Ta^3) 2003-09-24 19:48:41 UTC
A more ""clean"" solution is to add two scripts into /etc/ppp so you dont
have to edit /etc/init.d/net.ppp0 and when a ppp update arrives you lose your
changes and need to fix again.

Put this two files into /etc/ppp

---- ip-down.local -----
#!/bin/sh
/bin/chown root:users /etc/resolv.conf

---- ip-up.local -----
#!/bin/sh
/bin/chown root:users /etc/resolv.conf
Comment 3 Heinrich Wendel (RETIRED) gentoo-dev 2003-12-22 07:04:07 UTC
fixed in 2.4.2_beta3-r1
Comment 4 Jay Belanger 2004-04-05 21:04:00 UTC
But it seems to be back again in 2.4.2 (at least it is for me).
Comment 5 Heinrich Wendel (RETIRED) gentoo-dev 2004-04-06 03:52:45 UTC
what are your permissions of /etc/resolv.conf and /etc/ppp/resolv.conf
Comment 6 Bob Black 2004-04-14 23:09:03 UTC
What about your umask in /etc/profile?
Comment 7 Jay Belanger 2004-04-19 21:19:49 UTC
/etc/resolv.conf has permissions 600,
/etc/ppp/resolv.conf has permissions 644.

The umask is 022, which should be okay,I think.

I'm using the ip-up/down.local mentioned above, and it works for me.
Comment 8 Heinrich Wendel (RETIRED) gentoo-dev 2004-04-26 03:39:12 UTC
so is this problem fixed for you or not, me is a bit confused ;)
Comment 9 Jay Belanger 2004-04-26 13:17:17 UTC
Sorry, I should have been clearer.

Everything works fine for me.  But I need to use the ip-up.local and ip-down.local scripts mentioned above by Octavio Ruiz, otherwise I get resolv.conf permission problems.  Since I need the scripts, I think there's still something wrong.

But with the scripts it works great.  If no-one else is having problems anymore, it's probably not worth worrying about.
Comment 10 Chuck Brewer 2004-05-27 19:42:38 UTC
Line 220, net.ppp0- perms are changed in script because kppp was getting
busted and overwriting files..see http://devel-home.kde.org/~kppp/faq.html.
we had a bug on here about it also, it has since become lost....
Comment 11 Fred van Zwieten 2004-07-22 23:42:23 UTC
I'm running 2.4.2_r2 (the latest) and i'm not using ip-up nor ip-down, and I'm still having this problem. It took me a week to figure out this was causing my fresh qmail install to not send mail out anymore :-((.
Comment 12 Fred van Zwieten 2004-07-22 23:50:52 UTC
Also, bug 37886 seems to address the same problem, but is closed/fixed/resolved. I do not agree, but I can't reopen it (don't know why, but i'm not a bugzilla expert).
Comment 13 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-27 03:32:21 UTC

*** This bug has been marked as a duplicate of 37886 ***