mirror of
https://github.com/dehydrated-io/dehydrated.git
synced 2026-01-11 22:30:44 +01:00
accounts directory created in certificate directory #314
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @txr13 on GitHub (Mar 20, 2018).
I'm not sure what caused this, honestly... but here's what happened.
This occurred using
dehydratedfrom master, revisionb116e6b, during a normal cron run. One of my certificates has a certificate-specific config file there, which specifies a different hook file. There are no other variables set in that cert-specific config.During the cron run, I got the following output:
The output for that certificate stopped there. As I had keep-going set, the run continued on to the next certificate in the list and wrapped up normally. I caught it on review of the log and didn't think much of it--I'd recently been fiddling with the hook script for that certificate, and figured I had created an error of some sort that crashed the hook.
But I also noticed today that there was a new
accountsdirectory in the certificate output directory for that certificate, with a CA hash corresponding to the ACME v2 endpoint, with no contents. That is:I don't know how this new
accountsdirectory got there. The time of creation matches the time when the cron job was executing. And there's zero chance my hook script was creating an accounts directory with the CA hash underneath it.The other certificates processed at the same time do not have a local
accountsfolder created. It only shows up in the directory for the certificate with the per-certificate config file--which, incidentally, never returned from the deploy hook, but died quietly enough to move on to the next certificate without leaving an error in the cron log.I'm not sure what to make of it, honestly. Any thoughts?
@lukas2511 commented on GitHub (Mar 24, 2018):
Mhm, do you have a config file in that certificate directory and is there the slightest possibility that dehydrated was somehow executed inside of that directory?
accountsgets appended toBASEDIR, which normally comes from the config location, which (if there is nothing in/etc/dehydratedand/usr/local/etc/dehydrated) will be the current working directoryBut if that happened it shouldn't have continued as it would basically have used a broken config and/or an empty
accountsdirectory... but there is no other way, the wordaccountsdoesn't occur anywhere else in the script andACCOUNTDIRis only really used in the beginning of the script...@txr13 commented on GitHub (Mar 24, 2018):
The command as written in cron is:
/srv/dehydrated/dehydrated —cron —keep-going
Main config file is located at /srv/dehydrated/config. The certificate-specific config file is located within the certificate directory, but does not override the value of BASEDIR (which is set within the main config file).
I know, it’s weird.
@lukas2511 commented on GitHub (Apr 8, 2018):
I'm closing this for now as I can't reproduce this other than by running dehydrated directly in a certificate directory (any possibility that your hook-script somehow ran dehydrated?).
I might change the (preferred) name for that config file in the future so dehydrated doesn't ever get confused by this...