Fix inconsistent file access permissions