Browse Source
Merge pull request #623 from kevinoid/fix-well-known-perms
Avoid permissions errors for chown .well-known
pull/6285/head
neil
1 month ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
3 deletions
-
acme.sh
|
|
@ -5005,9 +5005,11 @@ $_authorizations_map" |
|
|
|
|
|
|
|
_debug "Writing token: $token to $wellknown_path/$token" |
|
|
|
|
|
|
|
mkdir -p "$wellknown_path" |
|
|
|
|
|
|
|
if ! printf "%s" "$keyauthorization" >"$wellknown_path/$token"; then |
|
|
|
# Ensure .well-known is visible to web server user/group |
|
|
|
# https://github.com/Neilpang/acme.sh/pull/32 |
|
|
|
if ! (umask ugo+rx && |
|
|
|
mkdir -p "$wellknown_path" && |
|
|
|
printf "%s" "$keyauthorization" >"$wellknown_path/$token"); then |
|
|
|
_err "$d: Cannot write token to file: $wellknown_path/$token" |
|
|
|
_clearupwebbroot "$_currentRoot" "$removelevel" "$token" |
|
|
|
_clearup |
|
|
|