Fixing db permissions