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

**URL:** <https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359>\
**Category:** Application Support\
**Created:** [July 12, 2023, 4:43pm UTC](https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359 "2023-07-12T16:43:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kim.aptum](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kim.aptum](https://community.kinsta.com/u/kim.aptum)\
**Post date:** [July 12, 2023, 4:43pm UTC](https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359/1 "2023-07-12T16:43:59Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Alessandro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/alessandro/32/2310_2.png) [@Alessandro](https://community.kinsta.com/u/Alessandro)\
**Post date:** [July 13, 2023, 8:12am UTC](https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359/2 "2023-07-13T08:12:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![kim.aptum](https://avatars.discourse-cdn.com/v4/letter/k/8baadc/32.png) [@kim.aptum](https://community.kinsta.com/u/kim.aptum)\
**Post date:** [July 13, 2023, 10:42am UTC](https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359/3 "2023-07-13T10:42:31Z")

</div>

I’m using Windows 11 and DevKinsta 2.11.0

---

<div class="post-metadata">

**Author:** ![ZachE](https://sea2.discourse-cdn.com/flex020/user_avatar/community.kinsta.com/zache/32/1683_2.png) [@ZachE](https://community.kinsta.com/u/ZachE)\
**Post date:** [July 14, 2023, 2:40am UTC](https://community.kinsta.com/t/devkinsta-on-windows-files-created-as-www-data-and-root/2359/4 "2023-07-14T02:40:57Z")

</div>

Hi @kim.aptum 👋

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:

> [@Using WP CLI - what is devkinsta\_fpm?](https://community.kinsta.com/t/using-wp-cli-what-is-devkinsta-fpm/2297/2):
>
> Found it. By entering docker exec -u www-data -it devkinsta\_fpm bash into the OS Shell one is entered into the Docker container, and the www bit of cd /www/kinsta/public/siteName has to do with server/Docker things and does not exist in the real OS filesystem. It’s probably the Container thingy that threw me off here; as a user of MAMP Pro, the newer «lightning» LocalWP builds and currently Laravel Valet this is an additional complication.

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
