Troubleshooting
Problem
Inconsistent object ownership causing difficulties with managing access and security on Microsoft Windows file servers.
Symptom
You may see the Microsoft Windows SMB file server object ownership is not being inherited correctly as well as inaccurate or missing object ownership information.
Cause
Can occur in circumstances where ownership on a file is given to a non-existing user or group probably often associated with a trusted or deleted domain. Once this happens, changing ownership will often be only possible manually through the GUI. If inheritance is from the root folder, it may remove all previously set ACLs on the file.
Environment
Windows Server 2022
Windows Server 2019
Windows Server 2016
Diagnosing The Problem
Resolving The Problem
icacls "E:\directory\subdirectory\...\affected directory" /grant "BUILTIN\Administrators:(OI)(CI)(F)" /t
Note: This will add the built-in admins to the folder and sub folders.
If the step above dose not work, you can try using the takeown command. This should enable the administrator to recover a file by making the administrator the owner of the file.
Note: This command is often used on batch files.
Takeown command examples:
takeown /f "C:\path\to\file.ext"
takeown /f "C:\path\to\folder" /A /r /d y
Further information:
Using the /A switch in the example, gives ownership to the Administrators group instead of the current user. The "/r switch" performs a recursive operation on all files in the specified directory and subdirectories, while the "/d y" switch suppresses the confirmation prompt for the applicable folder.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
24 July 2025
UID
ibm17181877