Skip to content

Commit

Permalink
nixos/security/acme: fix acme folder permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
lassulus authored and garbas committed May 11, 2017
1 parent 8b17444 commit fd7a8f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nixos/modules/security/acme.nix
Original file line number Diff line number Diff line change
Expand Up @@ -185,12 +185,15 @@ in
path = [ pkgs.simp_le ];
preStart = ''
mkdir -p '${cfg.directory}'
chown -R '${data.user}:${data.group}' '${cfg.directory}'
chown 'root:root' '${cfg.directory}'
chmod 755 '${cfg.directory}'
if [ ! -d '${cpath}' ]; then
mkdir '${cpath}'
fi
chmod ${rights} '${cpath}'
chown -R '${data.user}:${data.group}' '${cpath}'
mkdir -p '${data.webroot}/.well-known/acme-challenge'
chown -R '${data.user}:${data.group}' '${data.webroot}/.well-known/acme-challenge'
'';
script = ''
cd '${cpath}'
Expand Down

0 comments on commit fd7a8f1

Please sign in to comment.