I can confirm the issue is the following line in /etc/ppp/ip-up.d/0000usepeerdns as previously mentioned :
cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"
The variable expansion of that line is :
cp -a /run/systemd/resolve/stub-resolv.conf /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0
I had to modify the shebang line of that script from :
#!/bin/sh -e
to :
#!/bin/sh
to get past that line and output debugging output I inserted, which included :
ls -l /run/systemd/resolve/stub-resolv.conf
-rw-r--r-- 1 systemd-resolve systemd-resolve 720 Jan 17 21:47 /run/systemd/resolve/stub-resolv.conf
ls -l /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0
-rw------- 1 root root 720 Jan 17 21:47 /run/systemd/resolve/stub-resolv.conf.pppd-backup.ppp0
So 'cp -a' isn't copying the permissions. Oddly, $? is 0 after running that 'cp -a' line, therefor seems correct, also umask is 0022, so I'm not sure what is going wrong.
Anyway a fix seems to be to change the following line in /etc/ppp/ip-up.d/0000usepeerdns from :
cp -a "$REALRESOLVCONF" "$REALRESOLVCONF.pppd-backup.$PPP_IFACE"
I can confirm the issue is the following line in /etc/ppp/ ip-up.d/ 0000usepeerdns as previously mentioned :
cp -a "$REALRESOLVCONF" "$REALRESOLVCON F.pppd- backup. $PPP_IFACE"
The variable expansion of that line is : resolve/ stub-resolv. conf /run/systemd/ resolve/ stub-resolv. conf.pppd- backup. ppp0
cp -a /run/systemd/
I had to modify the shebang line of that script from :
#!/bin/sh -e
to :
#!/bin/sh
to get past that line and output debugging output I inserted, which included :
ls -l /run/systemd/ resolve/ stub-resolv. conf resolve/ stub-resolv. conf
-rw-r--r-- 1 systemd-resolve systemd-resolve 720 Jan 17 21:47 /run/systemd/
ls -l /run/systemd/ resolve/ stub-resolv. conf.pppd- backup. ppp0 resolve/ stub-resolv. conf.pppd- backup. ppp0
-rw------- 1 root root 720 Jan 17 21:47 /run/systemd/
So 'cp -a' isn't copying the permissions. Oddly, $? is 0 after running that 'cp -a' line, therefor seems correct, also umask is 0022, so I'm not sure what is going wrong.
Anyway a fix seems to be to change the following line in /etc/ppp/ ip-up.d/ 0000usepeerdns from :
cp -a "$REALRESOLVCONF" "$REALRESOLVCON F.pppd- backup. $PPP_IFACE"
to:
cp "$REALRESOLVCONF" "$REALRESOLVCON F.pppd- backup. $PPP_IFACE" F.pppd- backup. $PPP_IFACE"
chmod 644 "$REALRESOLVCON
For Ubuntu 18.04 setups that have the pppconfig package installed, the following lines in /etc/ppp/ ip-up.d/ 0dns-up probably should be changed from :
/bin/cp -Lp "$RESOLVCONF" "$RESOLVBAK" || exit 1
/bin/cp -Lp "$TEMPRESOLV" "$RESOLVCONF" || exit 1
chmod 644 "$RESOLVCONF" || exit 1
to:
/bin/cp -Lp "$RESOLVCONF" "$RESOLVBAK" || exit 1
chmod 644 "$RESOLVBAK" || exit 1
/bin/cp -Lp "$TEMPRESOLV" "$RESOLVCONF" || exit 1
chmod 644 "$RESOLVCONF" || exit 1