Skip to content

Commit

Permalink
chmod remote file copied by ssh to be all-readable
Browse files Browse the repository at this point in the history
This is for the case where remote umask is not world-readable:
something like 0027 or even 0077 (not even group-readable).

Remote file copied to /.well-known/ should perhaps be world-readable.
It really depends on web server configuration but we assume the most
common configuration.
  • Loading branch information
phdru committed May 28, 2017
1 parent 7a9ffb5 commit b61014e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions getssl
Original file line number Diff line number Diff line change
Expand Up @@ -516,6 +516,7 @@ copy_file_to_location() { # copies a file, using scp, sftp or ftp if required.
error_exit "problem copying file to the server using scp.
scp $from ${to:4}"
fi
ssh "$servername" "chmod a+r $tofile"
debug "userid $TOKEN_USER_ID"
if [[ "$cert" == "challenge token" ]] && [[ ! -z "$TOKEN_USER_ID" ]]; then
servername=$(echo "$to" | awk -F":" '{print $2}')
Expand Down

0 comments on commit b61014e

Please sign in to comment.