Fixed permission bugs in schema.sql
Merge branch 'hotfix-schema.sql'