more sophisticated setting of permissions for directory resources