Hi, my app is creating a directory so I can store log files in if, however i'm adding a user security to the directory but i don't know how to make it propagate, example i'm adding the user everyone to the directory, read and write access, but when my app then stores a log file in it this directory the log file has not inherited the everyone security(read, write) what am i missing?
DirectorySecurity dirSec = Directory.GetAccessControl(_dbPath);
dirSec.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.Write, AccessControlType.Allow));
dirSec.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.ReadAndExecute, AccessControlType.Allow));
dirSec.AddAccessRule(new FileSystemAccessRule("Everyone", FileSystemRights.CreateFiles, AccessControlType.Allow));
Directory.SetAccessControl(_dbPath, dirSec);