<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Times New Roman \(Body CS\)";
        panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.pfpttitle
        {mso-style-name:pfpttitle;}
span.pfptsubtitle
        {mso-style-name:pfptsubtitle;}
span.pfptpreheader2
        {mso-style-name:pfptpreheader2;
        display:none;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:14.0pt">It occurred to me that the problems must be in the system configuration (since it works outside of system)<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt">The problem was this line in the pdns.service file:<br>
<br>
ProtectHome=true<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt">Changing it to false solved he problem. Now I have to decide whether to leave it set to false, or move the backend out of /home.<o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:14.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt">-- <o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:14.0pt">Dan Campbell</span><span style="font-size:14.0pt"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:14.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Pdns-users <pdns-users-bounces@mailman.powerdns.com> on behalf of Dan Campbell - dan--- via Pdns-users <pdns-users@mailman.powerdns.com><br>
<b>Reply-To: </b>"Dan Campbell - dan@us.ibm.com" <dan@us.ibm.com><br>
<b>Date: </b>Thursday, January 21, 2021 at 4:00 PM<br>
<b>To: </b>"pdns-users@mailman.powerdns.com" <pdns-users@mailman.powerdns.com><br>
<b>Subject: </b>[EXTERNAL] Re: [Pdns-users] Pipebackend can't run backend<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal"></span><o:p></o:p></p>

<p class="MsoNormal"><span style="font-size:14.0pt">The script does have a shebang line and it runs fine from  the command line.
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt">It also work it I run “pdns_server –daemon=no”
</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt">I checked, and the VM does have SELinux, which was set to permissive mode by default. I disabled SELinux and rebooted.  It didn’t help.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt">Thanks for the suggestion, though. I didn’t know to check for that.</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:14.0pt">-- </span><o:p></o:p></p>
</div>
<p class="MsoNormal"><span style="font-size:14.0pt">Dan Campbell</span><o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">Brian Candler <b.candler@pobox.com><br>
<b>Date: </b>Thursday, January 21, 2021 at 2:07 PM<br>
<b>To: </b>"Dan Campbell - dan@us.ibm.com" <dan@us.ibm.com>, "pdns-users@mailman.powerdns.com" <pdns-users@mailman.powerdns.com><br>
<b>Subject: </b>[EXTERNAL] Re: [Pdns-users] Pipebackend can't run backend</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">On 21/01/2021 20:48, Dan Campbell - dan--- via Pdns-users wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt">I just installed the Authoritative server 4.4.0 on a CentOS 8 virtual machine and I’m trying to get a simple pipebackend running.</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt">The backend is a python script that runs from the command line, but pdns_server fails to start and give the following error:<br>
<br>
<br>
<br>
</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:14.0pt">[PIPEBackend] Unable to launch, fatal argument error: Command '/home/webapps/dns/bin/backend.py' cannot be executed: Permission></span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:14.0pt">Caught an exception instantiating a backend: Command '/home/webapps/dns/bin/backend.py' cannot be executed: Permission denied</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:14.0pt">Cleaning up</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:14.0pt">Distributor caught fatal exception: Command '/home/webapps/dns/bin/backend.py' cannot be executed: Permission denied</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
<span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt">The permissions on the script and all directories in the path are 755 …</span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt"> </span><o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:14.0pt">Any ideas about why pdns_server (running under the pdns id) does not have permissions to run a program with 755 permissions?</span><o:p></o:p></p>
</blockquote>
<p>If it has a shebang line and you can run it directly from the command line by typing "/home/webapps/dns/bin/backend.py", then my guess is that it's an SELinux or AppArmor thing.<o:p></o:p></p>
<p>Being CentOS then it would be SELinux.  Try switching SELinux into permissive mode and see if that makes it work.  If it does, have fun tweaking SELinux policies :-)<o:p></o:p></p>
<p>HTH,<o:p></o:p></p>
<p>Brian.<o:p></o:p></p>
</div>
</body>
</html>