How to make nextcloud aware of added files

#1

I’m running Nextcloud 11 on a raspberry pi 3 (raspbian jessie) with apache and mariadb. I had a zip-file in the Photos directory of my Nextcloud-account and wanted to unzip it, I logged in to the raspberry with ssh and unzipped the file there, but when I log in my Nextcloud account now, I don’t see the unzipped files in my Photos directory. How should I make Nextcloud aware of the new situation?

kind regards,
hugo

#2

https://docs.nextcloud.com/server/11.0/admin_manual/configuration_server/occ_command.html#file-operations

The occ files:scan command listed in the docs above :thumbsup:

#3

And add beside username --unscanned to just scan the new files, and reduce time therefore.

#4

You could also add
'filesystem_check_changes' => 1,

to your config.php as described here

‘filesystem_check_changes’ => 0,

Specifies how often the local filesystem (the Nextcloud data/ directory, and NFS mounts in data/) is checked for changes made outside Nextcloud. This does not apply to external storages.

0 -> Never check the filesystem for outside changes, provides a performance increase when it’s certain that no changes are made directly to the filesystem

1 -> Check each file or folder at most once per request, recommended for general use if outside changes might happen.

1 Like
Samba and file scan
#5

Thanks for your help, unfortunately I get the message below when trying the command:
sudo -u www-data php occ files:scan --path="/ramon/files/Photos"

Could not open input file: occ

Should I install something extra?

kind regards,
Hugo

#6

You have to give the full path to the occ file in your nextcloud directory:
sudo -u www-data php /path/to/nextcloud/occ files:scan --path="/ramon/files/Photos

1 Like
#7

Thanks for the reply, after a “chmod +x /var/www/nextcloud/occ” I could execute the command like this:
sudo -u www-data /var/www/nextcloud/occ files:scan --path="/ramon/files/Photos"

worked like a charm!

kind regards,
Hugo