IBM Support

Problem with object ownership and their children on Microsoft file servers

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 2025
Windows Server 2022
Windows Server 2019
Windows Server 2016

Diagnosing The Problem

No access or ability to modify permissions or ownership even with an administrator account.

Resolving The Problem

To recover, consider using the following icacls command example.

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

[{"Type":"MASTER","Line of Business":{"code":"LOB66","label":"Technology Lifecycle Services"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SSTIPK","label":"Microsoft Windows"},"ARM Category":[{"code":"a8mKe000000004NIAQ","label":"Windows"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]

Document Information

Modified date:
24 July 2025

UID

ibm17181877