help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.
In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:
example
Or for longer, use three backticks above and below the code snippet:
longer
example
here
Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can
Server details
Nextcloud version (eg, 20.0.5): 21.0.2
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.02
Apache or nginx version (eg, Apache 2.4.25): nginx/1.18.0
PHP version (eg, 7.4): 7.4.19
The issue you are facing:
My HDD was damaged, I replace it by the new one. Make file .ocdata in data folder, gave permission to user www-data:www-data. Copy all files in data directory from client PC.
After that error: “Make sure that a file “.ocdata” exists in the root directory of the data directory.” has gone. I can see files and folder in the browser, but i when I want to see pdf file for example, I receive error massage:
did you just crash the data disk and the system and database is on a different drive? Question is more if you restore an existing setup or if you start with a new one…
Console has to be executed with the user that owns the file config/config.php
Current user id: 0
Owner id of config.php: 33
Try adding 'sudo -u #33' to the beginning of the command (without the single quotes)
If running with 'docker exec' try adding the option '-u 33' to the docker command (without the single quotes)
So what I did then was: docker exec -it -u 33 nextcloud php occ files:scan --all
Then, I saw this:
Starting scan for user 1 out of 1 (denNorske)
+---------+-------+--------------+
| Folders | Files | Elapsed time |
+---------+-------+--------------+
| 5 | 29 | 00:00:00 |
+---------+-------+--------------+
Can you try and see if you get the same prompt, and if that will work for you?
sa@homesrv:~$ docker exec --user abc nextcloud php /config/www/nextcloud/occ files:scan --all
Starting scan for user 1 out of 3 (admin)
Home storage for user admin not writable
Make sure you’re running the scan command only as the user the web server runs as
Starting scan for user 2 out of 3 (katya)
Home storage for user katya not writable
Make sure you’re running the scan command only as the user the web server runs as
Starting scan for user 3 out of 3 (sasha)
Home storage for user sasha not writable
Make sure you’re running the scan command only as the user the web server runs as
±--------±------±-------------+
| Folders | Files | Elapsed time |
±--------±------±-------------+
| 0 | 0 | 00:00:00 |
±--------±------±-------------+