fix permissions for files