mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-16 15:58:36 +00:00
nixos/security/acme: fix acme folder permissions
This commit is contained in:
parent
8b17444047
commit
fd7a8f1b91
|
@ -185,12 +185,15 @@ in
|
||||||
path = [ pkgs.simp_le ];
|
path = [ pkgs.simp_le ];
|
||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -p '${cfg.directory}'
|
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
|
if [ ! -d '${cpath}' ]; then
|
||||||
mkdir '${cpath}'
|
mkdir '${cpath}'
|
||||||
fi
|
fi
|
||||||
chmod ${rights} '${cpath}'
|
chmod ${rights} '${cpath}'
|
||||||
chown -R '${data.user}:${data.group}' '${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 = ''
|
script = ''
|
||||||
cd '${cpath}'
|
cd '${cpath}'
|
||||||
|
|
Loading…
Reference in a new issue