Fix WordPress ownership and tighten permissions to match php-fpm pool
Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/3c7ded55-8f08-46f7-af17-6bbbdadba84b Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c40db26e6f
commit
158d369371
@@ -94,10 +94,10 @@ lib.mkIf config.sovran_systemsOS.services.wordpress {
|
|||||||
echo "Download complete."
|
echo "Download complete."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chown -R caddy:root "$INSTALL_DIR"
|
chown -R caddy:php "$INSTALL_DIR"
|
||||||
find "$INSTALL_DIR" -type d -exec chmod 755 {} \;
|
find "$INSTALL_DIR" -type d -exec chmod 750 {} \;
|
||||||
find "$INSTALL_DIR" -type f -exec chmod 644 {} \;
|
find "$INSTALL_DIR" -type f -exec chmod 640 {} \;
|
||||||
chmod -R 775 "$INSTALL_DIR/wp-content"
|
chmod -R 770 "$INSTALL_DIR/wp-content"
|
||||||
|
|
||||||
echo "Generating wp-config.php..."
|
echo "Generating wp-config.php..."
|
||||||
cd "$INSTALL_DIR"
|
cd "$INSTALL_DIR"
|
||||||
@@ -228,7 +228,7 @@ CREDS
|
|||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d /var/lib/www 0755 caddy root -"
|
"d /var/lib/www 0755 caddy root -"
|
||||||
"d /var/lib/www/wordpress 0755 caddy root -"
|
"d /var/lib/www/wordpress 0750 caddy php -"
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ wp-cli unzip ];
|
environment.systemPackages = with pkgs; [ wp-cli unzip ];
|
||||||
|
|||||||
Reference in New Issue
Block a user