I need to set the folder permission programatically. My req开发者_运维技巧uirement is when i set the parent folder, all its subfolders must inherit the parent permissions.
You would need to use the System.Management and System.Security frameworks:
http://www.redmondpie.com/applying-permissions-on-any-windows-folder-using-c/
To apply the same permissions in all subdirectories, you would need to use a foreach loop to iterate over all subdirectories of the directory you wish to modify.
精彩评论