Fix various file permissions