[api] fix file permissions
[api] fix repository index migration
[api] fix db migration registration
Merge remote-tracking branch 'upstream/master' into fedora