# Change ownership of Nextcloud files (root to www-data)

**URL:** <https://help.nextcloud.com/t/change-ownership-of-nextcloud-files-root-to-www-data/150657>\
**Category:** ℹ️ Support\
**Tags:** data\_directory\
**Created:** [November 25, 2022, 1:26pm UTC](https://help.nextcloud.com/t/change-ownership-of-nextcloud-files-root-to-www-data/150657 "2022-11-25T13:26:12Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [November 25, 2022, 1:56pm UTC](https://help.nextcloud.com/t/change-ownership-of-nextcloud-files-root-to-www-data/150657/4 "2022-11-25T13:56:55Z")

</div>

You can. The documentation says to do it like this:

```auto
chown -R www-data:www-data nextcloud
find nextcloud/ -type d -exec chmod 750 {} ;
find nextcloud/ -type f -exec chmod 640 {} ;

```

These examples use relative paths, so make sure they are correct for your system.

---

_[View the full topic](https://help.nextcloud.com/t/change-ownership-of-nextcloud-files-root-to-www-data/150657)._
