为什么有时在检查ACL访问时从FileSystemRights访问字段中获取数字?

有时我会像这样运行一个命令,我会回来一些容易阅读,容易解释的文本:

PS D:\test> (get-acl test.txt).Access | Select FileSystemRights FileSystemRights ---------------- Modify, Synchronize 

…其他时间我会找回一个数字:

  PS D:\test> (get-acl test2.txt).Access | Select FileSystemRights FileSystemRights ---------------- 268435456 

这个数字是什么,这是什么意思?

FileSystemRights属性是一个枚举。 然而,通用权利将不被列举。 查看输出:

 [System.Enum]::GetValues([System.Security.AccessControl.FileSystemRights]) 

访问掩码格式定义了通用访问权限的高4位。 这些权限是GENERIC_ALL(268435456) – 您所看到的GENERIC_EXECUTE(536870912),GENERIC_WRITE(1073741824)和GENERIC_READ(2147483648)

这只是一个受过教育的猜测。

它是一个更新,独立的Windows分支的映射驱动器。 服务器版本很可能具有其他ACL权限,而Windows 7 Pro没有这些ACL权限的文本描述。 因此它只显示ACL的数值。