question

GOURAVSHUKLA-2062 avatar image
0 Votes"
GOURAVSHUKLA-2062 asked LaurieStearn-5868 commented

Unable to display current owner

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

MotoX80 avatar image
1 Vote"
MotoX80 answered GOURAVSHUKLA-2062 commented

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://docs.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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

PS tools works for me. Thanks.

0 Votes 0 ·
MotoX80 avatar image
0 Votes"
MotoX80 answered GOURAVSHUKLA-2062 commented

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
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.




Still showing access denied. Not worked for me.

0 Votes 0 ·
MotoX80 avatar image MotoX80 GOURAVSHUKLA-2062 ·

Is the problem with just that one folder or do all folders have problems? Can you create these folders, add/update/delete files and change permissions?

d:\16ts_files\common\TestFolder
d:\16ts_files\TestFolder
d:\TestFolder

Have you rebooted recently? There may be a hung process with an open handle.

Reboot and then run chkdsk on that drive.

0 Votes 0 ·

I am able to create a new folder/file inside the folder and permission,owner remain same as of master folder but the folder which is already available are not opening. I also ran chkdsk also given restart to the server also tried all these method in safe mode to get rid of this still problem persists.

0 Votes 0 ·
Show more comments
FanFan-MSFT avatar image
0 Votes"
FanFan-MSFT answered GOURAVSHUKLA-2062 commented

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,

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

In d:\ drive we have many folders. But problem is with the sub folders. I can see main folders permission and ownership but I have the problem with sub folder, I can't able to see the ownership of the folder neither its permission. Thus folder not accessible. I have also tried to create new user with administration privileges and try give the permission but access denied.

0 Votes 0 ·
r4v00 avatar image
0 Votes"
r4v00 answered GOURAVSHUKLA-2062 commented

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

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Everything checked also given restart to the system. Taken out from domain. All possible stuff tried still hanged with the issue.

0 Votes 0 ·
LaurieStearn-5868 avatar image
0 Votes"
LaurieStearn-5868 answered LaurieStearn-5868 commented

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


settings.log (8.2 KiB)
ahk.log (12.4 KiB)
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

First, instead of adding a "me too" post to a question for which an answer has been accepted you should ask a new question.

Now, you can try the following workaround --

  1. Start notepad.exe with elevated privileges as Administrator.

  2. Click on File/Open to bring up the Open File dialog.

  3. Use the dialog to navigate to the folders of interest. Since the process is running as Administrator you should be able to view the contents of folders and/or open a folder's properties and use the security tab to change permissions.

1 Vote 1 ·

Hi RLWA! :)
Yes, the preference was to mention it here (first) as it does not appear to be a well-known issue. The security dialogs happily accept any changes made regarding ownership and sharing, but on re-opening them, there is the error provided in the OP. The difference here is that some WER folders can be opened with current privileges, others not, so not indicative of a problem with the file system.
Yes, that workaround succeeds as well, thanks.
.

0 Votes 0 ·

Actually, when using Explorer to change the permissions of the WER folder the change is made. In my tests the changes made through Explorer were in fact saved in the security descriptor of the WER folder. You can verify this with the notepad workaround.

I think what you are not considering is that Explorer runs as the logged-on user at the medium integrity level. If you examine the security information (use the Advanced dialog) for the WER folder again you will see that it is probably at a high integrity level. So even though you may have added permissions to the ACL for the folder the explorer process which ordinarily runs at a medium integrity level is initially denied access due to integrity level checks. Clicking the buttons to obtain Administrator access succeeds because Administrator access is at the high integrity level.

0 Votes 0 ·
Show more comments