Clean install on Linux mint 19 - cant create or write into data directory

Ok all, i am stumped I searched and searched and just cant not get past this point.

I am running Linux Mint 19, and I setup LAMP no issue, got my SSL running and my wordpress website all good.

I am running nextcloud, and copied it to the /var/www/html/ directory and named it cloud.

When running the install I just can not get past the data directory permission issue.

The exact error is “Can’t create or write into the data directory /media/www-data/Cloud/storage”

I obviously have an internal drive used for the storage of the data because the install drive is only 120 gig SSD.

So, in terminal I created a directory called “storage” and then assigned the www-data user permissions to it, I commented and uncommented the open_base = none in the php ini.

I just can not get past this point, any pointers would be appreciated.

I am new to linux, and came from an Nextcloud installation on the Mac using MAMP PRO so i am familiar with NC.

In the Nextcloud config-file config.php did you set
‘datadirectory’ => ‘/media/www-data/Cloud/storage’ ?

to be clear this is the first step to installing and nothing is written to the config file, so there is nothing to change. After install a config file is created. But i can not get to that point.

1 - copied nextcloud to var/www/html/ nextcloud

2 - assigned www-data user to nextcloud folder

3 - logged in with browser to

4- Install screen appears, created user name and password, where data directory is I put the location WHERE i want the data to be, in this case instead of /var/www/html/nextcloud/data i put /media/server/Cloud/nextcloud

5- proceed to put in database info and when i press finish setup - i get the cant write to data directory permission issues.

Anyone? If not this method, does anyone know how to move the DATA folder to an external drive?

I also have this problem with Linux mint 19.2.
Maybe someone have new ideas how to fix this ?

It was a permission issue with a he media folder I set it to the user and it worked.

Can u elaborate “set it to the user” ?