Upgrading from 10.0.12 to 10.1.1 fails due less permissions.

espocrm.log:
ERROR: (0) Failed to rebuild database schema. Rebuild database...