I want the file to be writable by all users.
FileSecurity sec = File.GetAccessControl(fileName); string users = ?????; sec.AddAccessRule(new FileSystemAccessRule( users, FileSystemRights.Write, AccessControlType.Allow)); File.SetAccessControl(fileName, sec);
The problem is that I do not know which line to use. I tried users = WindowsAccountType.Normal.ToString() , but this only gives "Normal" , which does not work. How can I get a string that represents the group of all users on the machine?
Boris
source share