1. Output of caddy version
:
v2.5.2 h1:eCJdLyEyAGzuQTa5Mh3gETnYWDClo1LjtQm2q9RNZrs=
2. How I run Caddy:
mycustomdomain.com {
root * /home/newuser/apps/mycustomdomain
php_fastcgi unix//run/php/php8.1-fpm.sock
file_server
encode gzip
@disallowed {
path /xmlrpc.php
path *.sql
path /wp-content/uploads/*.php
}
rewrite @disallowed '/index.php'
}
a. System environment:
Ubuntu 22
Caddy as system service
3. The problem I’m having:
This will run Wordpress on php-fpm 8.1 as www-data.
Wordpress will not allow any file system modifications using 755/644 folder/file permissions.
If I chown the files to www-data:www-data, things start to work fine.
How do I tell php-fpm to run as “newuser:newuser” in my Caddfile?