檔案系統的 SourceOne:使用者無法以「我的檔案」權限擷取檔案

Summary: 檔案系統的 SourceOne:使用者無法以「我的檔案」權限擷取檔案

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:使用者無法使用指派給網域使用者 AD 群組的對應資料夾「我的檔案」權限擷取檔案。
儘管如果使用服務帳戶標識,則可以訪問所有文件快捷方式。但是,所有標準使用者都無法訪問任何檔,除非在存檔檔和快捷方式(使用文件系統許可權的快照)之前,直接在檔本身的NTFS許可權下指定了他們的訪問許可權。

檢索失敗后,您將在文檔管理服務日誌中看到以下內容:
DocumentService::D oGetMessage|錯誤|GetMessage 錯誤:錯誤代碼:0x80070005,資料夾:xxxxxxxx 存取遭拒。(HRESULT 的例外情況:0x80070005 (E_ACCESSDENIED)) |(0)|工作 ID:-1;活動名稱:SERV1551;活動 ID:-1;活動類型:-1;伺服器名稱

Dell EMC 有一個測試群組工具,前身為 TestFixForGetAuthorizedGroup。  這會使用與 SourceOne 應用程式相同的類別來確定服務帳戶是否可以讀取使用者所在的 AD 組。
此工具使用 System.DirectoryServices 命名空間類來查找 AD 使用者,例如:
var domain = new PrincipalContext(ContextType.Domain);
var user = UserPrincipal.FindByIdentity(domain, userName);

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

除非此工具在域管理員標識下運行,否則您將收到以下異常:


例外文字 **************
System.Runtime.InteropServices.COMException (0x8007200A):指定的目錄服務屬性或值不存在。
在 System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)
at System.DirectoryServices.DirectoryEntry.Bind()
at System.DirectoryServices.DirectoryEntry.get_SchemaEntry()
at System.DirectoryServices.AccountManagement.ADStoreCtx.IsContainer(DirectoryEntry de)
at System.DirectoryServices.AccountManagement.ADStoreCtx..ctor(DirectoryEntry ctxBase, Boolean ownCtxBase, String username, String password, ContextOptions optionsoptions)
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 context, Type principalType, String identityValue)
at System.DirectoryServices.AccountManagement.UserPrincipal.FindByIdentity(PrincipalContext context, String identityValue)
at TestFixForGetAuthorizedGroup.Form1.GetUserDistinctedName(String userName)
at TestFixForGetAuthorizedGroup.Form1.GetUserGroups_Click(Object sender, EventArgs e)


此外,運行調用相同類的基本 PS1 腳本會返回相同的“指定的目錄服務屬性或值不存在”:錯誤:

$userName = 服務帳戶
添加類型 -組裝名稱 System.DirectoryServices.AccountManagement
$ct = [System.DirectoryServices.AccountManagement.ContextType]::D omain
$user = [System.DirectoryServices.AccountManagement.Principal]::FindByIdentity($ct,$userName)
$user。GetGroups() #gets 所有使用者組(直接)
$user。GetAuthorization Groups() #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 容器中搜尋使用者時發生這種情況的原因是,如果未指定容器,則主體上下文類將通過綁定到 builtin 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.