默认情况下,用于 DFS 文件夹的权限继承自命名空间服务器的本地文件系统。 这些权限从系统驱动器的根目录继承,并授予 DOMAIN\Users 组读取权限。 因此,即使在启用基于访问的枚举之后,命名空间中的所有文件夹仍对所有域用户可见。
继承权限的优点和限制
使用继承的权限来控制哪些用户可以查看 DFS 命名空间中的文件夹会带来两个主要的好处:
- 无需使用脚本即可快速将继承的权限应用于多个文件夹。
- 可以将继承的权限应用于命名空间根和文件夹,而无需目标。
尽管存在好处,但 DFS 命名空间中的继承权限也具有许多限制,导致它们不适用于大多数环境:
- 对继承权限的修改不会复制到其他命名空间服务器。 因此,请仅在独立命名空间或可实现第三方复制系统的环境中使用继承的权限,以保持所有命名空间服务器上的访问控制列表 (ACL) 处于同步状态。
- DFS Management and Dfsutil cannot view or modify inherited permissions. Therefore, you must use Windows Explorer or the Icacls command in addition to DFS Management or Dfsutil to manage the namespace.
- When using inherited permissions, you cannot modify the permissions of a folder with targets except by using the Dfsutil command. DFS 命名空间会自动从使用其他工具或方法设置目标的文件夹中移除权限。
- 如果在使用继承权限时对具有目标的文件夹设置权限,则在具有目标的文件夹上设置的 ACL 将与文件系统中文件夹的父级继承的权限相结合。 必须检查这两组权限,以确定网络权限的内容。
Note
在使用继承的权限时,在命名空间根和文件夹上设置没有目标的权限是最简单的。 然后,对具有目标的文件夹使用继承的权限,以便从其父级继承所有权限。
使用继承的权限
要限制哪些用户可以查看 DFS 文件夹,必须执行以下任务之一:
- 为文件夹设置显式权限,从而禁用继承。 To set explicit permissions on a folder with targets (a link) using DFS Management or the Dfsutil command, see Enable Access-Based Enumeration on a Namespace.
- 修改本地文件系统中父级的继承权限。 要修改具有目标的文件夹继承的权限,如果已对该文件夹设置显式权限,请切换到从显式权限继承的权限,如以下过程中所述。 Then use Windows Explorer or the Icacls command to modify the permissions of the folder from which the folder with targets inherits its permissions.
Note
如果用户已经知道具有目标的文件夹的 DFS 路径,则基于访问的枚举不会阻止用户获取文件夹目标的引用。 Permissions set using Windows Explorer or the Icacls command on namespace roots or folders without targets control whether users can access the DFS folder or namespace root. 但不会阻止用户直接访问具有目标的文件夹。 只有共享文件夹本身的共享权限或 NTFS 文件系统权限才能阻止用户访问文件夹目标。
从显式权限切换到继承的权限
In the console tree, under the Namespaces node, locate the folder with targets whose visibility you want to control, right-click the folder and then click Properties.
Click the Advanced tab.
单击“从本地文件系统使用继承的权限”,然后在“确认继承权限的使用”对话框中单击“确定”。 执行此操作会移除所有对此文件夹显式设置的权限,从而从命名空间服务器的本地文件系统还原继承的 NTFS 权限。
To change the inherited permissions for folders or namespace roots in a DFS namespace, use Windows Explorer or the ICacls command.