Copied files on HDD does not appear on Ownlcloud web nor Desktop

Expected behaviour

I tried to make a huge backup (180Gb) on my RPi Owncloud server that has a 500Gb HDD attached to it.
It was VERY slow (top speed 10 Mb/s), and I ended up copying the files directly from the PC to the HDD (thanks to USB 3.0 it was much faster).

I hoped the files will sync and nothing had to be copied from the PC to the Pi.

Actual behaviour

This files do not appear on the web server, and when I resumed
synchronization, it continued where I left it. Seems like it does not read the new files created on the HDD.

I of course disconnected the HDD from the Pi when everything was powered off, and didn’t turn the Pi on till the copy was finished.

Server configuration

Operating system: Raspbian stretch

Web server: apache2

Database: MySQL/MariaDB

PHP version: 7

ownCloud version: 10

Client configuration

Client version: 2.5.1 (build 10807)

Operating system: windows 10 Pro

OS language: Spanish

have you tried running occ files:scan?

Please read the documentation on how to use the command. It has to be executed on the command line.

It worked perfectly, for anyone with the same problem, the command I executed on SSH session via Putty with the Raspberry was:

sudo -u www-data php occ file:scan --all

Thank you dmitry.

Edit: you have to be in the directory where the OCC script is located to make this possible.

1 Like

Great to hear that it worked :slight_smile:

You can make life easier and write a script /usr/local/bin/occ

#! /bin/bash
cd /var/www/owncloud
sudo -E -u www-data php /var/www/owncloud/occ "$@"

With this, you can execute occ commands everywhere and you don’t need the sudo part. Of course you need to adjust this script with your actual ownCloud directory, mine is /var/www/owncloud


from what i have seen in the past (e.g. Files can be seen after rsync recently) the question about files not showing up after manual copy into the data directory is asked over and over again while being already answered in around 30 threads and within a separate Why does my files I put into datadir don't appear in ownCloud? FAQ.

I’m not sure how this situation could be improved?

Make a copy paste answer ready because people don’t read and don’t use the search? :smiley:


Please use this command while being in your ownCloud directory:

sudo -u www-data php occ file:scan --all

followed this Why does my files I put into datadir don't appear in ownCloud?

which lead me to outdated links to the 8.2 and 9.1 docs without the command that I need.

also followed this Files can be seen after rsync

and also did not find the command.

Am I missing something? @tom42

1 Like

@dmitry I use docker installation of owncloud.
When I try your command it tell me couldn’t find occ.


i thought more about something which could prevent such posts in the first place. :grinning:

e.g. better / more visible documentation about that, or a file within the data directory like “no_manual_upload.txt” which explains what to do or similar.

I think anything else probably doesn’t work as e.g. the mentioned FAQ is nearly 3 years old so it seems this is a long running / repeated issue. :slightly_frowning_face:

IMHO, you cannot. It’s impossible, unfortunately. Why digging trough the docs, when it’s so simple to ask a question here, with a reasonable chance to get an answer? Surely someone else is reading the docs/faq for me, or has gathered enough experience to give a qualified answer. So please go on…

1 Like


it is sad to say but this might be true (sometimes the truth is hard but needs to be accepted). :slightly_frowning_face:

1 Like

Are you using plain docker or the appliance?


for this question i had given some hints to @xavier_BUHOT in his very own thread:

where he asked the same question:

Well what did you expect? You try to make people read - they go somewhere else :slight_smile: