Make rebuild with many uploads more efficient?

For the purpose of rebuilding app, is there any way to make chown on /shared/uploads directory more efficient? Is there any workaround?

Currently this line alone takes more than 10 minutes (200.000+ uploads). Without it, rebuild would be reasonably quick.

5 Likes

I remember this coming up before @mpalmer is there any fancy “skip these files if the permissions on them already look correct” option for that command?

2 Likes

Yes, probably what caused this line to appear in web.template.yml:

find $home ! -user discourse -exec chown discourse {} \+

In this case, I think the command would be something like

find /shared/log/rails /shared/uploads /shared/backups /shared/tmp ! -user discourse -or ! -group www-data -exec chown discourse:www-data {} \+
3 Likes

Awesome, anything we can do to make it so?

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.