plesk / letsencrypt-plesk

Let’s Encrypt extension for Plesk gives all Plesk users the power to get a free Let’s Encrypt certificate with just a couple of clicks.
https://www.plesk.com/extensions/letsencrypt/
180 stars 25 forks source link

Error: Cannot create directory '.well-known/acme-challenge' #191

Closed sbrodehl closed 5 years ago

sbrodehl commented 7 years ago

Got some issues renewing multiple certificates, TLD's and subdomains. Here is the error log. I'm using Plesk Onyx v17.5.3_build1705170317.16 os_Debian 7.0 (Debian 7.11) with Let's Encrypt Version 2.4.0-231

Error: Could not issue a Let's Encrypt SSL/TLS certificate for example.com.

Could not access the following file or directory: '/var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge'.
Please make sure that the domain's system user has read and write access to this file or directory.
Details
Cannot create directory: '/var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge'
sbrodehl commented 7 years ago

Reinstalling Let's Encrypt extension did not solve the problem. Currently, there exists a folder . well-known owned by root:root

drwxr-xr-x 2 root   root    4.0K Aug 19 11:51 .well-known

Deleting this folder manually resolves the problem, during the renewal of the certificate a new .well-known folder is created by the plesk user in the psacln group, and renewal is a success.

So it looks like the user which executes the Let's Encrypt commands changed somehow?

digitall-it commented 6 years ago

It is probably a permission problem, please try to change recursively the ownership of the .well-known folder to the example.com user and psacln group.