Applies access control list (ACL) entries described by a System.Security.AccessControl.FileSecurity object to the file described by the current System.IO.FileStream object.
While the System.IO.FileStream class and FileStream.SetAccessControl(System.Security.AccessControl.FileSecurity) can be used on an existing file, consider using the File.SetAccessControl(string, System.Security.AccessControl.FileSecurity) method as it is easier to use.
The FileStream.SetAccessControl(System.Security.AccessControl.FileSecurity) method applies access control list (ACL) entries to a file that represents the noninherited ACL list.
The ACL specified for the fileSecurity parameter replaces the existing ACL for the file. To add permissions for a new user, use the FileStream.GetAccessControl method to obtain the existing ACL, modify it, and then use FileStream.SetAccessControl(System.Security.AccessControl.FileSecurity) to apply it back to the file.
An ACL describes individuals and/or groups who have, or do not have, rights to specific actions on the given file. For more information, see ACL Technology Overview and How to: Add or Remove an Access Control List Entry.