I need to set the folder permission programatically. My requirement 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.