Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Sharone
Hi Remi,
Sorry looks like I may have misinterpreted your question.
Even when invoke the command rec_control version as myself I do get an
error.


*$ rec_control versionFatal: Unable to generate local temporary file in
directory '/var/run/pdns-recursor': Permission denied*


Regards,
Sharone B.


On Tue, 7 Jan 2020 at 16:55, Remi Gacogne  wrote:

> On 1/7/20 2:41 PM, Sharone wrote:
> > I apologize if this has been discussed before. I cannot seem to find a
> > solution that works at the moment. I am trying to have this server poll
> > data but I have the error below when I try to snmpwalk
> >
> > * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
> >
> >
> > *# snmpwalk -v2c -c public localhost
> >
> .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
> > = STRING: "Fatal: Unable to generate local temporary file in directory
> > '/var/run/pdns-recursor': Permission denied"*
>
> I'm not sure of what your SNMP setup is, but it looks like the user
> invoking rec_control does not have the rights to create a new file in
> /var/run/pdns-recursor. What happens if you invoke the rec_control
> command directly as the 'pdns' user?
>
> Best regards,
> --
> Remi Gacogne
> PowerDNS.COM BV - https://www.powerdns.com/
>
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
>
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Sharone
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.


*# snmpwalk -v2c -c public localhost
.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
= STRING: "Fatal: Unable to generate local temporary file in directory
'/var/run/pdns-recursor': Permission denied"*

Below is what I get when I run the command rec_control as user pdns


*# su -c "rec_control version" -s /bin/sh
pdns4.3.0-beta1.52.master.ga9d432dc0*

Starting the recursor service

























*# systemctl status pdns-recursor.service ● pdns-recursor.service -
PowerDNS Recursor   Loaded: loaded
(/lib/systemd/system/pdns-recursor.service; enabled; vendor preset:
enabled)   Active: active (running) since Wed 2020-01-08 08:11:07 EAT;
14min ago Docs: man:pdns_recursor(1)   man:rec_control(1)
 https://doc.powerdns.com  Main PID: 22993
(pdns_recursor)Tasks: 19   Memory: 6.4M  CPU: 1.479s   CGroup:
/system.slice/pdns-recursor.service   └─22993
/usr/sbin/pdns_recursor --daemon=no --write-pid=no --disable-syslog
--log-timestamp=noJan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done
priming cache with root hintsJan 08 08:11:07 vdns-50 pdns_recursor[22993]:
Done priming cache with root hintsJan 08 08:11:07 vdns-50
pdns_recursor[22993]: Done priming cache with root hintsJan 08 08:11:07
vdns-50 pdns_recursor[22993]: Done priming cache with root hintsJan 08
08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root
hintsJan 08 08:11:07 vdns-50 systemd[1]: Started PowerDNS Recursor.Jan 08
08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with root
hintsJan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache with
root hintsJan 08 08:11:07 vdns-50 pdns_recursor[22993]: Done priming cache
with root hintsJan 08 08:11:07 vdns-50 pdns_recursor[22993]: Enabled
'epoll' multiplexer*

Hope this is clearer now
Regards,
Sharone B.


On Tue, 7 Jan 2020 at 18:15, Otto Moerbeek  wrote:

> On Tue, Jan 07, 2020 at 05:00:08PM +0300, Sharone Bakara wrote:
>
> > I get the same error as when I run it root.
> >
> > Regards,
> > SB
>
> Can you please make a new mail with the exact commands and the error
> messages? Your message seems to be misformatted.  It is confusing,
> since the error message seems to come from rec_control, but is below a
> snmpwalk command.
>
> So exact commands and exact error messages, please.
>
> -Otto
>
> >
> > > On 7 Jan 2020, at 16:55, Remi Gacogne 
> wrote:
> > >
> > > On 1/7/20 2:41 PM, Sharone wrote:
> > >> I apologize if this has been discussed before. I cannot seem to find a
> > >> solution that works at the moment. I am trying to have this server
> poll
> > >> data but I have the error below when I try to snmpwalk
> > >>
> > >> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
> > >>
> > >>
> > >> *# snmpwalk -v2c -c public localhost
> > >>
> .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
> > >> = STRING: "Fatal: Unable to generate local temporary file in directory
> > >> '/var/run/pdns-recursor': Permission denied"*
> > >
> > > I'm not sure of what your SNMP setup is, but it looks like the user
> > > invoking rec_control does not have the rights to create a new file in
> > > /var/run/pdns-recursor. What happens if you invoke the rec_control
> > > command directly as the 'pdns' user?
> > >
> > > Best regards,
> > > --
> > > Remi Gacogne
> > > PowerDNS.COM BV - https://www.powerdns.com/
> > >
> > > ___
> > > Pdns-users mailing list
> > > Pdns-users@mailman.powerdns.com
> > > https://mailman.powerdns.com/mailman/listinfo/pdns-users
> > ___
> > Pdns-users mailing list
> > Pdns-users@mailman.powerdns.com
> > https://mailman.powerdns.com/mailman/listinfo/pdns-users
>
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Michael Ströder
On 1/7/20 3:00 PM, Sharone Bakara wrote:
> On 7 Jan 2020, at 16:55, Remi Gacogne  wrote:
>> On 1/7/20 2:41 PM, Sharone wrote:
>>> '/var/run/pdns-recursor': Permission denied"*
>> I'm not sure of what your SNMP setup is, but it looks like the user
>> invoking rec_control does not have the rights to create a new file in
>> /var/run/pdns-recursor. What happens if you invoke the rec_control
>> command directly as the 'pdns' user?
>
> I get the same error as when I run it root.

Whenever "permissions denied" happens while running an action as root
I'd check whether SELinux or AppArmor blocks some access.
=> check your audit log (assuming you're running auditd)

Ciao, Michael.
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Otto Moerbeek
On Tue, Jan 07, 2020 at 04:15:16PM +0100, Otto Moerbeek wrote:

> On Tue, Jan 07, 2020 at 05:00:08PM +0300, Sharone Bakara wrote:
> 
> > I get the same error as when I run it root.
> > 
> > Regards,
> > SB
> 
> Can you please make a new mail with the exact commands and the error
> messages? Your message seems to be misformatted.  It is confusing,
> since the error message seems to come from rec_control, but is below a
> snmpwalk command.
> 
> So exact commands and exact error messages, please.

and your recursor.conf plus how did you start the recursor is also important.

> 
>   -Otto
> 
> > 
> > > On 7 Jan 2020, at 16:55, Remi Gacogne  wrote:
> > > 
> > > On 1/7/20 2:41 PM, Sharone wrote:
> > >> I apologize if this has been discussed before. I cannot seem to find a
> > >> solution that works at the moment. I am trying to have this server poll
> > >> data but I have the error below when I try to snmpwalk
> > >> 
> > >> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
> > >> 
> > >> 
> > >> *# snmpwalk -v2c -c public localhost
> > >> .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
> > >> = STRING: "Fatal: Unable to generate local temporary file in directory
> > >> '/var/run/pdns-recursor': Permission denied"*
> > > 
> > > I'm not sure of what your SNMP setup is, but it looks like the user
> > > invoking rec_control does not have the rights to create a new file in
> > > /var/run/pdns-recursor. What happens if you invoke the rec_control
> > > command directly as the 'pdns' user?
> > > 
> > > Best regards,
> > > -- 
> > > Remi Gacogne
> > > PowerDNS.COM BV - https://www.powerdns.com/
> > > 
> > > ___
> > > Pdns-users mailing list
> > > Pdns-users@mailman.powerdns.com
> > > https://mailman.powerdns.com/mailman/listinfo/pdns-users
> > ___
> > Pdns-users mailing list
> > Pdns-users@mailman.powerdns.com
> > https://mailman.powerdns.com/mailman/listinfo/pdns-users
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Otto Moerbeek
On Tue, Jan 07, 2020 at 05:00:08PM +0300, Sharone Bakara wrote:

> I get the same error as when I run it root.
> 
> Regards,
> SB

Can you please make a new mail with the exact commands and the error
messages? Your message seems to be misformatted.  It is confusing,
since the error message seems to come from rec_control, but is below a
snmpwalk command.

So exact commands and exact error messages, please.

-Otto

> 
> > On 7 Jan 2020, at 16:55, Remi Gacogne  wrote:
> > 
> > On 1/7/20 2:41 PM, Sharone wrote:
> >> I apologize if this has been discussed before. I cannot seem to find a
> >> solution that works at the moment. I am trying to have this server poll
> >> data but I have the error below when I try to snmpwalk
> >> 
> >> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
> >> 
> >> 
> >> *# snmpwalk -v2c -c public localhost
> >> .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
> >> = STRING: "Fatal: Unable to generate local temporary file in directory
> >> '/var/run/pdns-recursor': Permission denied"*
> > 
> > I'm not sure of what your SNMP setup is, but it looks like the user
> > invoking rec_control does not have the rights to create a new file in
> > /var/run/pdns-recursor. What happens if you invoke the rec_control
> > command directly as the 'pdns' user?
> > 
> > Best regards,
> > -- 
> > Remi Gacogne
> > PowerDNS.COM BV - https://www.powerdns.com/
> > 
> > ___
> > Pdns-users mailing list
> > Pdns-users@mailman.powerdns.com
> > https://mailman.powerdns.com/mailman/listinfo/pdns-users
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Sharone Bakara
I get the same error as when I run it root.

Regards,
SB

> On 7 Jan 2020, at 16:55, Remi Gacogne  wrote:
> 
> On 1/7/20 2:41 PM, Sharone wrote:
>> I apologize if this has been discussed before. I cannot seem to find a
>> solution that works at the moment. I am trying to have this server poll
>> data but I have the error below when I try to snmpwalk
>> 
>> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
>> 
>> 
>> *# snmpwalk -v2c -c public localhost
>> .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
>> = STRING: "Fatal: Unable to generate local temporary file in directory
>> '/var/run/pdns-recursor': Permission denied"*
> 
> I'm not sure of what your SNMP setup is, but it looks like the user
> invoking rec_control does not have the rights to create a new file in
> /var/run/pdns-recursor. What happens if you invoke the rec_control
> command directly as the 'pdns' user?
> 
> Best regards,
> -- 
> Remi Gacogne
> PowerDNS.COM BV - https://www.powerdns.com/
> 
> ___
> Pdns-users mailing list
> Pdns-users@mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


Re: [Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Remi Gacogne
On 1/7/20 2:41 PM, Sharone wrote:
> I apologize if this has been discussed before. I cannot seem to find a
> solution that works at the moment. I am trying to have this server poll
> data but I have the error below when I try to snmpwalk
>  
> * # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*
> 
> 
> *# snmpwalk -v2c -c public localhost
> .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
> = STRING: "Fatal: Unable to generate local temporary file in directory
> '/var/run/pdns-recursor': Permission denied"*

I'm not sure of what your SNMP setup is, but it looks like the user
invoking rec_control does not have the rights to create a new file in
/var/run/pdns-recursor. What happens if you invoke the rec_control
command directly as the 'pdns' user?

Best regards,
-- 
Remi Gacogne
PowerDNS.COM BV - https://www.powerdns.com/



signature.asc
Description: OpenPGP digital signature
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users


[Pdns-users] pdns-recursor Permissions Error

2020-01-07 Thread Sharone
I apologize if this has been discussed before. I cannot seem to find a
solution that works at the moment. I am trying to have this server poll
data but I have the error below when I try to snmpwalk


* # sudo -u pdns rec_control version4.3.0-beta1.39.master.g0c1ebf7c*


*# snmpwalk -v2c -c public localhost
.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
= STRING: "Fatal: Unable to generate local temporary file in directory
'/var/run/pdns-recursor': Permission denied"*

*Permissions*
*drwxr-xr-x  2 pdns pdns   60 Jan  7 16:31 pdns-recursor/*

*srwxrwxrwx  1 pdns pdns   0 Jan  7 16:21 pdns_recursor.controlsocket=*

*OS details*










*NAME="Ubuntu"VERSION="16.04.6 LTS (Xenial
Xerus)"ID=ubuntuID_LIKE=debianPRETTY_NAME="Ubuntu 16.04.6
LTS"VERSION_ID="16.04"HOME_URL="http://www.ubuntu.com/
"SUPPORT_URL="http://help.ubuntu.com/
"BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/
"VERSION_CODENAME=xenialUBUNTU_CODENAME=xenial*

I'd be glad to share any more info to have this resolved. Thank you.

Regards,
Sharone
___
Pdns-users mailing list
Pdns-users@mailman.powerdns.com
https://mailman.powerdns.com/mailman/listinfo/pdns-users