# Nextcloud Storage

**URL:** https://dietpi.com/forum/t/nextcloud-storage/15470
**Category:** General Discussion
**Created:** [4 January 2023 13:13 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470 "2023-01-04T13:13:56Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Tox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Tox](https://dietpi.com/forum/u/Tox)
#### Post date: [4 January 2023 13:13 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/1 "2023-01-04T13:13:56Z")

</div>

First of all let me wish an Happy New Year to the Dietpi Team !!

I was thinking about something relevant to nextcloud with dietpi on a raspberry: in case of using an external USB storage if the raspberry crashes, what is the way to have still an access to the data on the external storage as there might be a owner/user rights problem ?  
(I already know that it is recommended to have a backup of the system to get rid of this 😉)

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [5 January 2023 08:16 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/2 "2023-01-05T08:16:54Z")

</div>

Happy new year to you as well! By default dietpi is not encrypting, so you can mount the external drive to another system and access your data.

---

<div class="post-metadata">

### Author: ![Tox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Tox](https://dietpi.com/forum/u/Tox)
#### Post date: [5 January 2023 08:44 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/3 "2023-01-05T08:44:27Z")

</div>

Well I have tested it with a linux PC and the user is not able to access to the data as the owner is www-data and I didn’t wanted to change the access rights to the external drive as it is working correctly with the dietpi system. So I was just wandering how it could be done without having a dietpi spare system ready to use.

---

<div class="post-metadata">

### Author: ![Joulinar](https://dietpi.com/forum/user_avatar/dietpi.com/joulinar/32/57_2.png) [@Joulinar](https://dietpi.com/forum/u/Joulinar)
#### Post date: [5 January 2023 08:59 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/4 "2023-01-05T08:59:06Z")

</div>

What user did you used on your spare systems? Usually, you would need to add your user into group `www-data` to allow access via group rights. As an alternativ, user `root` should have access always.

---

<div class="post-metadata">

### Author: ![Tox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Tox](https://dietpi.com/forum/u/Tox)
#### Post date: [5 January 2023 09:03 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/5 "2023-01-05T09:03:58Z")

</div>

The other system is working with xubuntu so the basic user doesn’t have root rights (but I know i can change its rights to do a test). But “… you would need to add your user into group `www-data` to allow access via group rights…” give me an idea I will need to try.

---

<div class="post-metadata">

### Author: ![trendy](https://dietpi.com/forum/user_avatar/dietpi.com/trendy/32/61_2.png) [@trendy](https://dietpi.com/forum/u/trendy)
#### Post date: [5 January 2023 09:41 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/6 "2023-01-05T09:41:07Z")

</div>

The group might not have the same rights as the user, just saying. But I suppose that it will be able to read them.  
@Joulinar I guess that it has to do with group id and not group name. Therefore the gid that www-data has on one system might be different in another.  
@Tox you can check with `id www-data` the user and group id for `www-data`  
Then, on the other system, there should be a group with the same group id. If not create it with the correct gid `sudo groupadd -g XXX www-data`  
Finally you can add the user in the `www-data` group `sudo usermod -a -G www-data username`

---

<div class="post-metadata">

### Author: ![Tox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Tox](https://dietpi.com/forum/u/Tox)
#### Post date: [5 January 2023 12:13 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/7 "2023-01-05T12:13:32Z")

</div>

I will test it and let you know.

---

<div class="post-metadata">

### Author: ![Tox](https://dietpi.com/forum/letter_avatar_proxy/v4/letter/t/8e8cbc/32.png) [@Tox](https://dietpi.com/forum/u/Tox)
#### Post date: [6 January 2023 16:35 UTC](https://dietpi.com/forum/t/nextcloud-storage/15470/8 "2023-01-06T16:35:22Z")

</div>

OK it works ! with the same group id I was able to read all the files on the external drive. Thank you for help
