Reindex files via 'occ' in Docker Appliance

Situation

I had to restore files from an external backup and these files didn’t show up in the webfrontend.
I knew - since oC 8.x - I have to reindex the files but couldn’t figure out how to do this in a multi-container docker environment.

Solution

Depending on your System you first have to find out some facts.

Common (Debian/Ubuntu)

  1. find the right docker container
    docker ps -all
  2. enter the docker container
    docker exec -ti <CONTAINER-ID> bash
  3. find the webserver user
    the owner of /var/www/owncloud should be the right one but you can verify by checking the process owner of apache2 via 'ps u | grep apache`
  4. run reindex
    root@owncloud: /var/www/owncloud # su - www-data -c 'php /var/www/owncloud/occ files:scan --all'

UCS - Univention Corporate Server

Because some facts are clear you simply can do the following:

  1. enter the docker container
    univention-app shell owncloud
  2. run reindex
    root@owncloud: /var/www/owncloud # su - www-data -c 'php /var/www/owncloud/occ files:scan --all'
1 Like