Closed SDuesterhaupt closed 3 years ago
What is the umask
value of your root account? I guess its last digit is greater than 3, so the files created by root is not readable by any user.
I do not want to put privileged command (chown
) into the script, since its use does not require root access. (I even recommend not to run it as root.). But making the created token file world readable is good idea, so the web server could definitely read it.
Here is the patch: https://github.com/bruncsak/ght-acme.sh/commit/20a85140ef2a5834bd0819f235ca316da3d3b36d
Sometimes I have problems to read the token:
The token is created with that owner which also runs the letsencrypt.sh. Here it was
root
.The webserver executes the webcontent with a owner which
is not root
. Generally in the default installation it'sapache
(CentOS) orwww-data
(Debian?).So maybe we should set the owner and optionally the permission within the function
push_domain_response()
by:The user and group names are inherited by the
TOKEN_DIR
.