This method should work for you. public static void AddFileSecurity(string FileName, string Account, FileSystemRights Rights, AccessControlType ControlType) { try { // Create a new FileInfo object. FileInfo fInfo = new FileInfo(FileName); // Get a FileSecurity object that represents the // current security settings. FileSecurity fSecurity = fInfo.GetAccessControl(); // Add the FileSystemAccessRule to the security settings. fSecurity.AddAccessRule(new FileSystemAccessRule(Account, Rights, ControlType)); // Set the new access settings. fInfo.SetAccessControl(fSecurity); } catch (Exception exp) { Console.WriteLine(exp.Message.ToString()); Console.Read(); } } You can use it with something like this: FileWritePermission.AddFileSecurity(path, "everyone", System.Security.AccessControl.FileSystemRights.FullControl, System.Security.AccessControl.AccessControlType.Allow); Cheers
M
Member 4187998
@Member 4187998