Unable to display current owner

GOURAV SHUKLA 21 Reputation points
2021-08-01T12:34:18+00:00

I have a folder in which n numbers of file is there but it is not getting opened. It is showing unable to show owner. I have tried all the ways to apply ownership through built-in admin account but it shows error that "access is denied". I have tried using takeown and icacls command but still it showing access denied. Pls help.

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,151 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 31,651 Reputation points
    2021-08-02T17:38:56.643+00:00

    Earlier the folder was ok, while applying some permission rule in sub folders this problem arose.

    Sounds like you somehow managed to corrupt the file system. I would have expected chkdsk to fix that.

    I can think of 2 things you can try. First try using psexec and run cmd.exe.

    https://learn.microsoft.com/en-us/sysinternals/downloads/psexec

    psexec -s cmd.exe  
    

    That will launch a command prompt that will be running as the system account. (Run whoami.exe). Then try the 4 commands that I posted earlier. If you still get "access denied", then I don't know what to tell you if SYSTEM can't access the files.

    Chkdsk does have this switch.

    /sdcleanup          NTFS only: Garbage collect unneeded security descriptor  
                          data (implies /F).  
    

    You could try that, but if the permissions are corrupt, I would have no way of knowing what that might do to your file system. Do you have a backup of the files/folders?

    1 person found this answer helpful.

4 additional answers

Sort by: Most helpful
  1. MotoX80 31,651 Reputation points
    2021-08-01T15:35:21.55+00:00

    Here is the command sequence that I have used in the past to gain access to a folder where the permissions were locked down.

    It will reset ownership to the Administrator group and set the permissions on the "Bad" folder and all subfolders and files to whatever permissions you have set on the parent "Test" folder.

    You can save it as a .bat file or just paste the commands into an admin cmd prompt window.

    set badfolder="C:\Test\Bad"
    takeown /d Y /a /r /f %badfolder%
    icacls %badfolder% /reset /t 
    icacls %badfolder% /verify /t
    

  2. Fan Fan 15,291 Reputation points Microsoft Vendor
    2021-08-02T01:54:20.993+00:00

    Hi,
    Welcome to share here!
    To know the issue more clearly, please confirm the following information:

    Was the issue for all the files within the folder or the specific one?
    How about the parent folder? Can you see the owner on the parent folder?
    Can you view and check the permission with the built-in account?
    What if you assign a user with full control on the files and then use the user to take the ownership?

    If there are any progresses, welcome to share here!

    Best Regards,


  3. Ravo Maminirina RABEARISOA 11 Reputation points
    2021-08-02T12:29:50.387+00:00

    Hello,
    Try to check via openfile if there's something locking the folder (System process, ...)
    Or as MotoX said restart the computer.
    We've faced the same issue and it appeared that the folder was locked by system user that accessed it from network (weird).
    Hope it will help


  4. Laurie Stearn 91 Reputation points
    2021-11-15T09:29:31.787+00:00

    Hi,
    Have a similar issue in Windows Home 20H2 19042.1348 with the WER ReportArchive folder. Attempting to open folders created by AutoHotkey, but in order to do so, some actions through the security tab are first accepted, but are lost when re-opening the tab.
    Not so much luck with PSExec, the command window flicks out after the command.
    A file for a Settings crash is able to be opened in Explorer, however, so must be something to do with the ids of the folder creator. Luckily, was able to send the AHK folder to OneDrive, and open the WER report there through the browser. Attached the two files, if the ids can be of any use, that would be great.
    Thanks.
    149287-settings.log149280-ahk.log