Fix some permissions and stuff