Seafile Pro as non root user very slow startup (lots of chowns being run)

I just started to use Seafile, running Seafile Pro 11.0.6. I have a library that’s now about ~400 GB, mostly photos. Whenever I restart Seafile (running in docker compose), it takes like 5 minutes to start.

I’ve debugged a bit and found out that it’s because I’m running the seafile container as NON_ROOT. Running as root, it starts in seconds.

I see some entries that change the ownership of all files in the shared directory.

chown -R seafile:seafile /shared/

This command looks like it’s run three times(!?) in the scripts folder:

./enterpoint.sh:31:    chown -R seafile:seafile /opt/seafile/ 
./enterpoint.sh:32:    chown -R seafile:seafile /shared/
./start.py:76:            call('chown -R seafile:seafile /shared/seafile/')
./cluster_start.py:48:            call('chown -R seafile:seafile /shared/seafile/')

Is it really necessary to run this, on every startup? Three times? Shouldn’t this be a setting being set once, and then you stick with it? (Trying to change from non-root to root does not seem to be supported.)