Moving data directory to external drive

Nextcloud version (eg, 10.0.2): 11.0.3
Operating system and version (eg, Ubuntu 16.04): Bananian 3.4.112
Apache or nginx version (eg, Apache 2.4.25): Apache
PHP version (eg, 5.6): 5.6.30

I’m trying to move my data directory to my external hard drive which is connected to the pi. If I change the data folder in the setup, it says, it cannot create the data directory (/media/sda1/data).

So I did a normal setup and I copied the data directory to /media/sda1/data. Then I created a symlink, but this also doesn’t work. It can’t find the .ocdata, but it’s there.

File permissions:

drwxr-xr-x   3 root root 4096 Apr  8  2016 media
drwxrwxrw- 12 Flo Flo 4096 Apr 29 23:00 sda1
drwxrwxrwx  5 www-data www-data 4096 Apr 29 23:00 data
lrwxrwxrwx 1 root root 17 Apr 29 23:02 /var/www/html/cloud/data -> /media/sda1/data/

Is the execute bit on your sda1 folder for others missing?
You can check the permissions with sudo -u www-data ls -la /media/sda1/data

Now it is probably for debugging reasons, running a folder with chmod 777 is not good for security reasons because everyone can read and write in this folder.

Nevermind, see below :slight_smile:

I thought you can symlink the whole directory (but nothing within the folder, e.g. for each user). And moving it should be possible now:

Then ignore me, I’ve been working off old information :open_mouth:

Updating the database wouldn’t need to be done either in this case using a symlink.

How was the data copied?