SourceOne for Files Systems:用户无法检索具有“My Files”权限的文件

Summary: SourceOne for Files Systems:用户无法检索具有“My Files”权限的文件

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms



SourceOne for Files Systems:用户无法检索分配给域用户 AD 组的映射文件夹“My Files”权限的文件。
但如果使用服务帐户标识,则可以访问所有文件快捷方式。但是,所有标准用户都不能访问任何文件,除非在文件归档和快捷方式(使用文件系统权限的快照)之前直接在文件本身的 NTFS 权限下指定其访问权限。

检索失败后,您将在 Docmanageservice 日志中看到以下内容:
DocumentService::D oGetMessage|错误 |GetMessage 错误:错误代码:0x80070005,文件夹:xxxxxxxx 访问被拒绝。(HRESULT 异常:0x80070005 (E_ACCESSDENIED)|(0)|作业 ID:-1;活动名称:SERV1551;活动 ID:-1;活动类型:-1;Servername

Dell EMC have a Test-Group tool, formerly TestFixForGetAuthorizedGroup.  它使用与 SourceOne 应用程序相同的类来确定服务帐户是否可以读取用户所在的 AD 组。
此工具使用 System.DirectoryServices 命名空间类来查找 AD 用户,例如:
var domain = new PrincipalContext(ContextType.Domain);
var 用户 = UserPrincipal.FindByIdentity(domain, userName);

UserPrincipal upLogonUser = UserPrincipal.FindByIdentity(pc, IdentityType.DistinguishedName, sUserDN);

除非此工具在域管理员身份下运行,否则您将收到以下异常:


异常文本 **************
System.Runtime.InteropServices.COMException (0x8007200A):指定的目录服务属性或值不存在。
在 System.DirectoryServices.DirectoryEntry.Bind (布尔值 throwIfFail)
在 System.DirectoryServices.DirectoryEntry.Bind()
在 System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
在 System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
在 System.DirectoryServices.AccountManagement.ADStoreCtx.ctor(DirectoryEntry ctxBase,布尔值 ownCtxBase,字符串用户名,字符串密码,ContextOptions 选项)
at System.DirectoryServices.AccountManagement.PrincipalContext.CreateContextFromDirectoryEntry(DirectoryEntry entry)
at System.DirectoryServices.AccountManagement.PrincipalContext.DoLDAPDirectoryInitNoContainer()
at System.DirectoryServices.AccountManagement.PrincipalContext.DoDomainInit()
atSystem.DirectoryServices.AccountManagement.PrincipalContext.Initialize()
at System.DirectoryServices.AccountManagement.PrincipalContext.get_QueryCtx()
at System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithTypeHelper(PrincipalContext context, Type principalType, Nullable'1 identityType, String identityValue, DateTime refDate)
在 System.DirectoryServices.AccountManagement.Principal.FindByIdentityWithType (PrincipalContext 上下文,类型 principalType,字符串 identityValue)
在 System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity (PrincipalContext 上下文,字符串 identityValue)
在 TestFixForGetAuthorizedGroup.Form1.GetUserDistinguishedName (字符串用户名)
在 TestFixForGetAuthorizedGroup.Form1.GetUserGroups_Click (对象发送方,EventArgs e)


此外,运行这个调用相同类的基本 PS1 脚本将返回相同的“指定的目录服务属性或值不存在”: error:

$userName = Service account
Add-Type -AssemblyName System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::D omain
$user = [System.DirectoryServices.AccountManagement.Principal]::FindByIdentity($ct,$userName)
$user。GetGroups() #gets 所有用户组(直接)
$user。GetAuthorizationGroups() #gets 所有用户组,包括嵌套组(间接)



Cause

https://blogs.msdn.microsoft.com/dsadsi/2009/08/28/getting-an-exception-the-specified-directory-service-attribute-or-value-does-not-exist-when-you-try-to-search-a-user-in-an-ad-container-using-system-directoryservices-accountmanagement/

“当您尝试使用 System.DirectoryServices.AccountManagement.UserPrincipal::FindByIdentity

搜索 AD 容器中的用户时,获得异常指定的目录服务属性或值不存在发生这种情况的原因是:如果未指定容器,则主体上下文类将通过绑定到内置的 CN=Users 容器来创建 System.DirectoryServices.DirectoryEntry 对象以开始搜索用户。System.DirectoryServices 基于 ADSI 构建。  默认情况下,除非指定了 fastbind 标志,否则 ADSI 会将 objectclass=* 搜索作为其正常绑定过程的一部分。  如果执行搜索的用户无权读取默认用户包含的属性,则搜索作将失败,从而导致指定的目录服务属性或值不存在、异常。

使用 ComputerPrincipal::FindByIdentity 搜索计算机对象时,如果没有对 CN=Computer 容器的读取权限,并且未在 System.DirectoryServices.AccountManagemnt.PrincipalContext 的构造函数中指定容器,则也是如此。http://msdn.microsoft.com/en-us/library/system.directoryservices.accountmanagement.principalcontext.principalcontext.aspx 文档的备注部分解释了 PrincipalContext 类在构造函数中未显式指定容器时选择容器时遵循的规则。

Resolution

分配对 AD 组的读取权限。

Affected Products

SourceOne for File Systems

Products

SourceOne, SourceOne Email Management, SourceOne for File Systems
Article Properties
Article Number: 000056717
Article Type: Solution
Last Modified: 26 May 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.