Data folder moved on external storage but at same level

Nextcloud version: 21.0.3
Operating system and version: Raspberry OS
Snap version

I moved data folder inside external disk. The main data folder of NC is empty. I store my data on ssd

I follow this guide: Permissions Issue with Data Storage "Snap" - Solved - #2 by Zak7

Now I have my data folders and the nc data folder with also:
‘myusername’ folder
audit.log file

All to same level. mydatafolder is mine, other are of nextcloud
My mistake I think was to have copied nextcloud/data to /media/nextcloud without /data

All visible from web interface
Next I changed permission of all file with -R rwxrwxrwx
and user to www-data:www-data

My files in web interfaces are hidden, I see only folder but no files inside

Actually: ‘datadirectory’ => ‘/media/nextcloud’

What I should do?
Move mydatafolder inside ‘myusername’ folder?

Thank you

Its hard to understand what you actually did, but lets give it a shot:
If you like to move you datadirectory, pls consider:

  1. Enable Maintenance Mode
  2. Copy the datadirectory to the new place with all subfolders
  3. change the config.php file and tell the nextcloud the new localttion
  4. give the owner rights to the user and group of www-data of the new directory
  5. disable m mode
  6. check everything is running the way it should
  7. delete the old datadirectory

Its a bit punching arround the bush but I do it always this way to ensure nothing is lost, no databasecrashes etc.

1 Like