fix file permissions for files