Integrity check | Results EXTRA_FILE for every uploaded file

Hello, im facing some issues with the integrity check on my nextcloud, every uploaded file is not passing the checker. NcVersion: 28.0.4

[core] => Array
(
[EXTRA_FILE] => Array
(
[9F6043E/files/xxxxx.pdf] => Array
(
[expected] =>
[current] => f47f185abbda34aa88daac5a542742da7f30e6df
)

Please post your config, and particularly your datadirectory value. I suspect you have misconfigured it to be your installation folder somehow (rather than something like installation_folder/data).

1 Like

yeah my nextcloud data directory is on /var/www/nextcloud.
/var/www/nextcloud/config/config.php
grafik

I also see all the Folders from the users in the /var/www/nextcloud path.
So probably i have to move all the folders to something like /var/www/nextcloud/data and change the data directory in the config.php, right?

Yes, but you need a couple other steps: Moving the data directory

You’ll need to use the first approach, which will involve a small db adjustment as well. You cannot use the symbolic link approach since you’re not simply moving the data directory but actually extricating it from your install folder.

1 Like

I think you must delete the file with linux tools e.g. rm:
/var/www/nextcloud/data/9F6043E/files/xxxxx.pdf

9F6043E: username ???!!!???
xxxx.pdf: filename

Delete only the one file. Make a backup of the file if you need the file again.

Test with another user in your Nextcloud if delete of the file does not help.

Today Nextcloud 28.0.5 will be shipped. Maybe it solves your problem. Also you can upgrade to Nextcloud 29.0.0 but it is the first version. Maybe wait until Nextcloud 29.0.1 in a month.

Maintenance and Release Schedule · nextcloud/server Wiki · GitHub

yeah but its not only one file, was just an example how the error looks like.
I think i have to change the data directory path like @jtr said.
Also every new created file lands in the /var/www/nextcloud directory.
Probably the problem was, while doing the Install Setup i changed the path for nextcloud from /var/www/nextcloud/data to /var/www/nextcloud.

Ok check in config.php:

  'datadirectory' => '/var/www/nextcloud/data',

data-directory is not the installation directory.

Perhaps the contents of /var/www/nextcloud and /var/www/nextcloud/data have become mixed up. You may have to reinstall or post the contents (folders and files) on the first level of both directories.

I will backup my db and take a snapshot of my vm.
Then i will try to move my data. Do you think its the right way?

I don’t know what you did. If you use ls to post the contents of the two directories, you may be able to simply move a few files or directories. I will write to you and tell you which ones they are. You cannot move everything, as you have installed in /var/www/nextcloud.

ls /var/www/nextcloud
ls /var/www/nextcloud/data

Sorry the first screenshot does not help. But in /var/www/nextcloud/data i have got.


appdata_oci9lr6mj2xg (not my original, you have got another value)
files_external 
username
updater-oci9lr6mj2xg (not my original, you have got another value)
index.html
nextcloud.log
updater.log

Maybe you can move it to the correct path and then change config/config.php. If it not works, i think you must re-install.

Whitch files did you got in /var/www/nextcloud ?

dirs:

3rdparty
apps
config
core
data
dist
lib
ocs
ocs-provider
resources
themes
updater

files:

AUTHORS
composer.json
composer.lock
console.php
COPYING
cron.php
index.html
index.php
occ
package-lock.json
package.json
public.php
remote.php
robots.txt
status.php
version.php
1 Like

Yeah it worked :smiley:
Changed only the directory in the config.php and copied all files except the files and directorys you send me in the /var/www/nextcloud.
thx for the help

2 Likes

Sry , it still didnt worked, i rebooted my machine and used the occ command for file scan (sudo -u www-data php /var/www/nextcloud/occ files:scan --all) and the system just removed all the files from the users. Maybe i should changed the path direct in the database .
I hat to reroll everything (snapshot, pg_dumb)
I probably will set up a new instance of nextcloud and migrate the data, is there a good instructions how to migrate the data and change the data directory path =)

As I stated, yes, you will need to change the path in the database.

I probably will set up a new instance of nextcloud and migrate the data, is there a good instructions how to migrate the data and change the data directory path

Yes. But it’s likely unnecessary in your case: Migrating to a different server — Nextcloud latest Administration Manual latest documentation

could you help me, which commands do i need for postgre database to change the path.

You’ll have to use either psql or a GUI tool. If using psql something like:

UPDATE oc_storages SET id = 'local::/new/path/to/data/' WHERE id = 'local::/var/www/nextcloud/';

CAUTION: Backup your database beforehand.

yeah now it worked :smiley:
Final fix:

  1. sudo -u www-data php /var/www/nextcloud/occ maintenance:mode --on
  2. pg_dumb of the data-base & Snapshot fof the VM
  3. mkdir new datadirectory (/var/www/nextcloud/data
  4. sudo chown -R www-data:www-data /var/www/nextcloud/data
  5. mv * all data-folders to the new data directory (check the messages above of the location of the directory and files)
  6. sudo nano /var/www/nextcloud/config/config.php (‘datadirectory’ => ‘/var/www/nextcloud/data/’,)
  7. Connect to the database (pgsql -h -p -u-)
  8. UPDATE oc_storages SET id = ‘local::/new/path/to/data/’ WHERE id = ‘local::/var/www/nextcloud/’;
  9. \q
  10. sudo systemctl restart php, redis, nginx
  11. sudo -u www-data php /var/www/nextcloud/occ maintenance:repair
  12. sudo -u www-data php /var/www/nextcloud/occ files:scan --all
2 Likes

I have on more question, i have still this error message in my logs.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.