Fix permissions when creating domain dir