复制文件夹的安全性. [英] Copy folder security.

查看:114
本文介绍了复制文件夹的安全性.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我有一个程序,需要复制一个文件夹及其权限,然后在另一个目标上创建该文件夹的副本.  目标文件夹必须与要复制的文件夹保持完全相同的安全性.  

Hello I have a program that needs to copy a folder along with it's permissions and then create a replica of that folder on another destination.  The folder on the destination must retain the exact same security as the folder being copied.  

我在这里找到了有关如何执行此操作的示例:

I found an example on how to do this here:

http://support.microsoft.com/kb/899553

 

但是,微软似乎没有提供 Active Directory服务接口(ADSI)版本下载链接中的2.5.nbsp.dll. 损坏,无法在inet上的任何地方找到下载文件.

however it seems microsoft does not offer the Active Directory Service Interfaces (ADSI) Version 2.5 .dll anymore on their site as the download links are broken and I cannot find a download anywhere on the inet.

推荐答案

对于NTFS安全和访问控制,您可以利用DirectorySecurity类;可以在名称空间下使用: http://msdn.microsoft.com/zh-cn/library/system.security.accesscontrol.directorysecurity.aspx

For NTFS security and Accesscontrol, You can utilize, DirectorySecurity Class which is available under the namespace: System.Security.AccessControl
Sample code is available at: http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity.aspx

根据您的要求,您应该使用GetAccessControl和SetAccessControl.

Depending on your requirement you should use GetAccessControl and SetAccessControl.


这篇关于复制文件夹的安全性.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆