Any way to disable file cache or to force folders re-scan?

Hello There!
First of all, I want to thank the Nextcloud team for this great product. We’ve been ownCloud users but after evaluating Nextcloud we would like to migrate.

At this point, there is only one thing preventing such thing. Let me explain our scenario first:

We’ve ~5TB of data in our file server with about 50 users. Most of them access the server via AFP (Mac) and just a bunch of users using samba (windos guys). We’ve been using ownCloud as the alternative web interface to access our files and share them with clients, so when new files are created or deleted directly in the server (using AFP or SMB) we need to be able to see them in the web interface (own/nextcloud).

With our current setup using ownCloud (getting older and obsolete every day) we see this changes happening (almost) immediately, but this is not happening with Nextcloud. I know there is a way to force the files re-scan by using the occ cli command but, of course, we can’t just execute it 100 times per day.

So, the question is: Is there any configuration option to force Nextcloud to scan the files/folder every time a user access them?

I’ve been testing with the latest Nextcloud docker image available at this moment, using this docker -compose file:

version: '2'
volumes:
  nextcloud:
  nextcloud_db:

services:
  mariadb:
    container_name: mariadb
    hostname: mariadb
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - nextcloud_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=**********
      - MYSQL_PASSWORD=**********
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

  nextcloud:
    container_name: nextcloud
    hostname: nextcloud
    image: nextcloud
    restart: always
    ports:
      - '8171:80'
    links:
      - mariadb
    volumes:
      - './vhosts:/etc/apache2/sites-enabled'
      - './html:/var/www/html'
      - '/NAS:/NAS'
      - '/data:/data'
    restart: always
    environment:
      - MYSQL_HOST=mariadb
      - MYSQL_DATABASE=nextcloud
      - MYSQL_PASSWORD=**********
      - NEXTCLOUD_DATA_DIR=/data
      - NEXTCLOUD_ADMIN_USER=root
      - NEXTCLOUD_ADMIN_PASSWORD=**********

Thank you again!

Enrique

I think this is what you’re looking for?
'filesystem_check_changes' => 1,

Found here:

Definitely noodle around with it some. I haven’t used it since it was considered experimental…granted, that was when the latest version was Nextcloud 10 :slight_smile: seemed to work well then when I set it up when testing w/ a company, haven’t personally battle tested it though

4 Likes

Excellent. This is exactly what I’ve been looking for,

Thank you so much stratacast!!

1 Like

Great! Have fun :slight_smile:

If you change files other than via Nextcloud, you should rather use external storages where Nextcloud expects files being changed.

1 Like