From 2dd1579b0ba5930e63aa5a3fdc88cabcf980f09d Mon Sep 17 00:00:00 2001 From: Martijn Cuppens Date: Thu, 11 Jan 2024 11:35:07 +0100 Subject: [PATCH] Switch to owner change instead of shh user change Fixes https://github.com/deployphp/deployer/issues/3542 --- recipe/provision/website.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/recipe/provision/website.php b/recipe/provision/website.php index 380b77786..ced37a615 100644 --- a/recipe/provision/website.php +++ b/recipe/provision/website.php @@ -11,9 +11,8 @@ desc('Provision website'); task('provision:website', function () { - set('remote_user', 'deployer'); - run("[ -d {{deploy_path}} ] || mkdir {{deploy_path}}"); + run("chown -R deployer:deployer {{deploy_path}}"); $domain = get('domain'); $phpVersion = get('php_version'); @@ -69,7 +68,6 @@ run("echo $'$caddyfile' > Caddyfile"); } - set('remote_user', 'root'); if (!test("grep -q 'import $deployPath/Caddyfile' /etc/caddy/Caddyfile")) { run("echo 'import $deployPath/Caddyfile' >> /etc/caddy/Caddyfile"); }