Execute certbot-auto command using perl system command


Hello ,

I am working to automate the certificate create process upon selecting a domain from my drop-down list.

Server side programming i am using is in Perl Language.

I have used to create the certificate by use of system command as follows.

$command = /root/letsencrypt/./certbot-auto certonly --standalone -n -d ‘. $domainname .’ -w '. $webroot;


But, it always throwing below error

Can’t exec “/root/letsencrypt/./certbot-auto”: Permission denied

Can anyone help on this please.

Thanks in advance
Rajkumar S


Are you running your perl script as root?


Yes, i am running as root user


Try to run the command in your shell, if it works, there should be no permission problem.

/root/letsencrypt/./certbot-auto certificates

No issues were found on this command

Found the following certs:
  Certificate Name: mydomain.com
    Domains: mydomain.com
    Expiry Date: 2018-07-08 12:07:31+00:00 (INVALID: TEST_CERT)
    Certificate Path: /etc/letsencrypt/live/mydomain.com/fullchain.pem
    Private Key Path: /etc/letsencrypt/live/mydomain.com/privkey.pem

Let me check to find if any other issues 



If you can run the exact same command line on your shell, it must work with perl’s system() command, too.

Try the following in a perl script:

$command = “/root/letsencrypt/./certbot-auto certificates”;



thanks .

The error was with my side as i am running the let’s encrypt service without root user. Now it has been corrected.

Rajkumar S


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.