C# – How to set permissions for a directory (Windows only)
When you want to set permissions for a directory (and its files/subdirectories), you can use DirectoryInfo.GetAccessControl() to get the directory’s security, add/modify/remove access control rules, and then use DirectoryInfo.SetAccessControl() to apply the changes. Access control rules are a complex combination of different settings. They control being able to do things like creating a file in … Read more