private void ParseAcl(string acl) { //and example of a real acl string: //user::rw-,user:6b157067-78b0-4478-ba7b-ade5c66f1a9a:rwx,group::r--,mask::rwx,other::--- Acl.Clear(); if (acl == null) { return; } foreach (string textForm in acl.Split(',')) { bool isDefault = textForm.StartsWith("default:"); string processForm = isDefault ? textForm.Substring(8) : textForm; var entry = new AclEntry(processForm); if (entry.ObjectId == null) { //special entry if (entry.Type == "user") { OwningUserPermissions = entry; } else if (entry.Type == "group") { OwningGroupPermissions = entry; } //ignore other special objects as they're not important } else { //push ID'd objects to the rest of the ACL if (isDefault) { DefaultAcl.Add(entry); } else { Acl.Add(entry); } } } }