sami
October 17, 2016, 12:35pm
1
Hello,
now I have the next problem with my cloud.
After a server restart write the cloud by a upload.
Error uploading file "avatar.jpg": Upload failed. Can not find uploaded file.
Can somebody help me.
Thank you in advance.
Best regards
Christoph
sami
October 17, 2016, 2:33pm
2
Hello again,
now I have found the data but I would like to copy the files to the 2TB HDD.
I have use this commands:
cp
-r /media/nextcloud/* /media/mypc/HDD-Name/nextcloud-data/`
After that i have change in the config.php from
'datadirectory' => '/media/nextcloud'
to
'datadirectory' => '/media/mypc/HDD-Name/nextcloud-data/'
.
Now the cloud are doesn’t work.
She write:
Data directory (/media/mypc/HDD-Name/nextcloud-data) is invalid
Please check that the data directory contains a file “.ocdata” in its root.
The .ocdata file are in the nextcloud-data.
Why is doesn’t work?
Best regards,
Christoph
I’m guessing you have a permission issue. Is the user, Nextcloud is running as, able to access the files at the new location?
Also, did you update the oc_storage table in database? For instructions on moving the data directory, see Is there a safe and reliable way to move data directory out of web root? . Those steps worked for me, but keep in mind that it is not supported and may not work in all cases.
sami
October 17, 2016, 4:23pm
4
Hello,
thank you for the link.
Now I have change the link in oc_storage, controll again in config.php, restart apache, and doesn’t work.
The cloud give me these infos:
Data directory (/media/mypc/HDD-Name/nextcloud-data) is invalid
Please check that the data directory contains a file ".ocdata" in its root.
Cannot create "data" directory (/media/mypc/HDD-Name/nextcloud-data)
This can usually be fixed by giving the webserver write access to the root directory.
I use these code for the permission:
a) sudo chown www-data /media/mypc/HDD-Name/nextcloud-data
b) chown www-data:root /media/mypc/HDD-Name/nextcloud-data
I don’t know why is the problem.
Best regards,
Christoph
wollo
October 17, 2016, 4:56pm
5
Did you try
sudo chown -R www-data /media/mypc/HDD-Name/nextcloud-data
so that all files under this sub directory have this permission?
is there a file .ocdata in this subdirectory ?
Try
ls /media/mypc/HDD-Name/nextcloud-data/.ocdata_
is it availlable
sami
October 17, 2016, 5:17pm
6
Regarding,
The .ocdata_ file doesn’t copy from the other disk.
I created manuell and is normaly not viewed.
I mus take the shortcut strg+h
After that I can see the .ocdata_
If I use nur shell code ls /media/mypc/HDD-Name/nextcloud-data/.ocdata_ I don’t get any information from the shell.
Best regards,
Christoph
.ocdata**_** ?
It should be “.ocdata” …
root@uplink:/home/nas# ls -a /media/500_1/nextcloud/data/.ocdata
/media/500_1/nextcloud/data/.ocdata
Regards,
Christian