Hubdog的葵花宝典呀。<br><br>您可以使用SetFilePermission (Win32 API)来设置NTFS上的<br>文件和目录的权限<br>用法如下:<br>BOOL SetFilePermission(LPCTSTR lpFileName, // address of string for filename<br>SECURITY_INFORMATION SecurityInformation, // type of information to set<br>PSECURITY_DESCRIPTOR pSecurityDescriptor // address of security descriptor<br>); <br><br>SECURITY_INFORMATION用于指示下面一个参数的类型, 它可以取如下的值:<br>OWNER_SECURITY_INFORMATION <br>文件和目录的所有者信息<br><br>GROUP_SECURITY_INFORMATION <br>主组信息<br><br>DACL_SECURITY_INFORMATION <br>自由的访问控制列表(ACL)信息<br><br>SACL_SECURITY_INFORMATION <br>系统的访问控制列表(ACL)信息<br><br>请您参考下列API函数和数据结构以获得设置权限的进一步的信息:<br>ACL (DataStructure, Access Control List)<br>Get/SetSecurityDescriptorDacl<br>Get/SetSecurityDescriptorGroup<br>Get/SetSecurityDescriptorOwner<br>Get/SetSecurityDescriptorSacl<br><br>另外, 就是GetFilePermission,