DevKinsta on Windows, files created as www-data and root

I have installed DevKinsta and imported a project. The files are owned by www-data. When installing a plugin through wp-admin, that plugin is also owned by www-data. When connecting to the devkinsta_fpm container with vscode and installing dependencies with composer or adding files in the editor those files are owned by root. The root files does create issues and are not writable by the php scripts any more. I can of course change the ownership manually, but still it feels like I’m doing something wrong if I have to do this busy work all the time. Is there a better way to handle this, or am I editing the files the wrong way?

Hi Kim and welcome to Kinsta Community!
Can you please share what OS you are on and what DevKinsta version you are currently using?

Regards,
Alessandro

I’m using Windows 11 and DevKinsta 2.11.0

Hi @kim.aptum :wave:

What extension and what configuration do you have for VSCode to connect to your devkinsta_fpm container? Perhaps it’s missing a username setting?

In general, to do things as the user in the container interactively from a Command Prompt, you’d do something similar to this:

Another thing to check here is that if you’re getting prompted for FTP credentials when updating a plugin or installing one, you could use this in wp-config.php:

define('FS_METHOD', 'direct');

Otherwise, the easiest solution is to do a recursive chown (-R) to www-data:www-data without supplying the -u option to Docker, as you have been.

Let me know if this helps