<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">The
issue is that I need to be able to poll data from the recursive DNS
server, however I have been having trouble with permissions. This is the
error I get when I run snmpwalk from the server.<br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><span class="gmail-im"># snmpwalk -v2c -c public localhost .1.3.6.1.4.1.8072.1.3.2.4.1.2<br></span>iso.3.6.1.4.1.8072.1.3.2.4.1.2.8.112.100.110.115.45.114.101.99.1 = STRING: "Fatal: Unable to generate local temporary file in directory '/var/run/pdns-recursor': Permission denied"</i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Below is what I get when I run the command rec_control as user pdns<i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i># su -c "rec_control version" -s /bin/sh pdns<br>4.3.0-beta1.52.master.ga9d432dc0</i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Starting the recursor service</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i># systemctl status pdns-recursor.service <br>● pdns-recursor.service - PowerDNS Recursor<br> Loaded: loaded (/lib/systemd/system/pdns-recursor.service; enabled; vendor preset: enabled)<br> Active: active (running) since Wed 2020-01-08 08:11:07 EAT; 14min ago<br> Docs: man:pdns_recursor(1)<br> man:rec_control(1)<br> <a href="https://doc.powerdns.com" target="_blank">https://doc.powerdns.com</a><br> Main PID: 22993 (pdns_recursor)<br> Tasks: 19<br> Memory: 6.4M<br> CPU: 1.479s<br> CGroup: /system.slice/pdns-recursor.service<br> └─22993 /usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog --log-timestamp=no<br><br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 systemd[1]: Started PowerDNS Recursor.<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root hints<br>Jan 08 08:11:07 vdns-50 pdns_recursor[22993]: Enabled 'epoll' multiplexer<br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hope this is clearer now<i><br></i></div></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="font-family:trebuchet ms,sans-serif">Regards,<br></span></div><div><span style="font-family:trebuchet ms,sans-serif">Sharone B.</span><br></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 7 Jan 2020 at 18:15, Otto Moerbeek <<a href="mailto:otto@drijf.net">otto@drijf.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Tue, Jan 07, 2020 at 05:00:08PM +0300, Sharone Bakara wrote:<br>
<br>
> I get the same error as when I run it root.<br>
> <br>
> Regards,<br>
> SB<br>
<br>
Can you please make a new mail with the exact commands and the error<br>
messages? Your message seems to be misformatted. It is confusing,<br>
since the error message seems to come from rec_control, but is below a<br>
snmpwalk command.<br>
<br>
So exact commands and exact error messages, please.<br>
<br>
-Otto<br>
<br>
> <br>
> > On 7 Jan 2020, at 16:55, Remi Gacogne <<a href="mailto:remi.gacogne@powerdns.com" target="_blank">remi.gacogne@powerdns.com</a>> wrote:<br>
> > <br>
> > On 1/7/20 2:41 PM, Sharone wrote:<br>
> >> I apologize if this has been discussed before. I cannot seem to find a<br>
> >> solution that works at the moment. I am trying to have this server poll<br>
> >> data but I have the error below when I try to snmpwalk<br>
> >> <br>
> >> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*<br>
> >> <br>
> >> <br>
> >> *# snmpwalk -v2c -c public localhost<br>
> >> .1.3.6.1.4.1.8072.1.3.2.4.1.2iso.3.6.1.4.1.8072.1.3.2.4.1.2.8.112.100.110.115.45.114.101.99.1<br>
> >> = STRING: "Fatal: Unable to generate local temporary file in directory<br>
> >> '/var/run/pdns-recursor': Permission denied"*<br>
> > <br>
> > I'm not sure of what your SNMP setup is, but it looks like the user<br>
> > invoking rec_control does not have the rights to create a new file in<br>
> > /var/run/pdns-recursor. What happens if you invoke the rec_control<br>
> > command directly as the 'pdns' user?<br>
> > <br>
> > Best regards,<br>
> > -- <br>
> > Remi Gacogne<br>
> > PowerDNS.COM BV - <a href="https://www.powerdns.com/" rel="noreferrer" target="_blank">https://www.powerdns.com/</a><br>
> > <br>
> > _______________________________________________<br>
> > Pdns-users mailing list<br>
> > <a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
> > <a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
> _______________________________________________<br>
> Pdns-users mailing list<br>
> <a href="mailto:Pdns-users@mailman.powerdns.com" target="_blank">Pdns-users@mailman.powerdns.com</a><br>
> <a href="https://mailman.powerdns.com/mailman/listinfo/pdns-users" rel="noreferrer" target="_blank">https://mailman.powerdns.com/mailman/listinfo/pdns-users</a><br>
</blockquote></div>