Let's Encrypt challenge files are not removed from .well-known/acme-challenge/ directories

Follow

Comments

5 comments

  • Avatar
    Websavers Inc

    Does the fix included in version 2.8.0 of the extension clean up existing acme-challenge files, or only ones that were created *after* the update?

    0
    Comment actions Permalink
  • Avatar
    Ekaterina Babenko

    Websavers Inc, hi! Thanks for your question!

    After fix applied, it will clean up existing files, which are not older than 3 months.

    Only the oldest one need to be removed manually.

    0
    Comment actions Permalink
  • Avatar
    Jonas Frey

    It seems the cleanup (for old files from prior the upgrade to 2.8.0) does not work. I have tested this on CentOS 6 and 7 (with Plesk 17.8) and it did not clean up the existing old files (even not after 1 week).

     

    0
    Comment actions Permalink
  • Avatar
    Denis Bykov

    @Jonas Frey

    I can explain it if permissions or ownership of those files was changed. In that case, I can suggest removing them manually.
    If there are some further issues, consider contacting regular Plesk support.

    0
    Comment actions Permalink
  • Avatar
    Websavers Inc (Edited )

    We didn't find many cases where the argument list wasn't too long for rm to work, so the following (only slightly modified) ones did the trick:

    mkdir /root/empty_dir
    rsync -a --delete /root/empty_dir/ /var/www/vhosts/default/htdocs/.well-known/acme-challenge/
    rsync -a --delete /root/empty_dir/ /usr/share/psa-horde/.well-known/acme-challenge/
    plesk db -NBe "select www_root from hosting" > /root/domains_root_dir.list
    cat /root/domains_root_dir.list | while read i; do [[ -d "$i/.well-known/acme-challenge/" ]] && echo $i && rsync -a --delete /root/empty_dir/ $i/.well-known/acme-challenge/; done
    rm -rf /root/empty_dir/ /root/domains_root_dir.list

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request