- Plesk for Linux
/usr/share/psa-horde/.well-known/acme-challenge/, as well as websites' document root folders (like
/var/www/vhosts/example.com/httpdocs/.well-known/acme-challenge) are becoming populated with an indefinite number of files.
Cleanup is not explicitly disabled in
/usr/local/psa/var/modules/letsencrypt/cli.iniLet's Encrypt configuration file; the following command returns empty output:
# cat /usr/local/psa/var/modules/letsencrypt/cli.ini | grep 'disable-cleanup'
Let's Encrypt extension bug with EXTLETSENC-676 that will be fixed in one of the future extension updates. Let's Encrypt challenge tokens are not removed in case certificate issue/renewal is failed.
These files can be safely removed manually:
Connect to the server via SSH.
Remove the files from the default website and webmail directories:
# rm -rf /var/www/vhosts/default/htdocs/.well-known/acme-challenge/*
# rm -rf /usr/share/psa-horde/.well-known/acme-challenge/*
Note: In case there are thousands of files, the following commands can be used to empty the folders faster:
# mkdir /empty_dir
# rsync -a --delete /empty_dir/ /var/www/vhosts/default/htdocs/.well-known/acme-challenge/
# rsync -a --delete /empty_dir/ /usr/share/psa-horde/.well-known/acme-challenge/
Get a list of the document root directories for all domains and put it into
domains_root_dir.listfile using the following command:
# plesk db -NBe "select www_root from hosting" > domains_root_dir.list
Remove files from these directories using the following command:
# cat domains_root_dir.list | while read i; do echo $i; rm -rf $i/.well-known/acme-challenge/*; done
Note: In case there command above fails due to the amount of files, the following command can be used instead:
# cat domains_root_dir.list | while read i; do echo $i; rsync -a --delete /empty_dir/ $i/.well-known/acme-challenge/; done
Additionally, these commands can be set up as daily Scheduled Tasks. See the following documentation for instructions on setting up tasks: Scheduling Tasks.