resolve permissions and database creation issues