Security settings for subfolders and files



I have created a new Directory from my C# application. Here's how I set
users permission :

DirectoryInfo di = Directory.CreateDirectory(sPath);
DirectorySecurity dSecurity = di.GetAccessControl();

// Add the FileSystemAccessRule to the security settings.
dSecurity.AddAccessRule(new FileSystemAccessRule(userName,
FileSystemRights.FullControl, AccessControlType.Allow));

// Set the new access settings.
di.SetAccessControl(dSecurity);

This is working fine.. but the permission is set on the specified
folder only, I want the permission to include the folder, all it's
subfolders and files

Can anybody please help me...??

.



Relevant Pages

  • Re: Network shares cannot connect
    ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
    (microsoft.public.windows.server.sbs)
  • Re: Network shares cannot connect
    ... Changed value to 0 just waiting to re-boot the server and test logins. ... Workstation Name: - ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
    (microsoft.public.windows.server.sbs)
  • MCSA/MCSE Self-training book from MS PRESS for exam 70-215 incorrect on file permission questions?
    ... includes the AccountingDept folder, which contains documents specific to the ... accounting department. ... The Accounting group includes all members of the ... AccountingDept folder by granting Read permission to the Accounting group ...
    (microsoft.public.win2000.file_system)
  • Re: Practice Test with Wrong Answers?
    ... "The Modify permission does not include the Delete Subfolders and Files ... so permanent employees cannot delete files form the Progress ... When I try this out the modify permissions for the parent folder get ...
    (microsoft.public.cert.exam.mcsa)
  • Re: Network shares cannot connect
    ... User Name: SERVER$ ... Regarding the shares accessing problem, I suggest you try following steps ... let's focus on the Users Shared Folder first. ... To check this permission, please click the Advanced button, select ...
    (microsoft.public.windows.server.sbs)