Nextcloud Storage

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 :wink:)

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.

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.

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.

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.

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

I will test it and let you know.

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

1 Like