Score:1

Folders untouchable: owner unknown and cannot be changed

ke flag

I have a parent folder, let's call it 'P', and in P resides 5 child folders. I am administrator of this non-domain joined server, but I cannot delete these child folder or in any other way alter them. I think my problem arose when I fooled around with folder permissions and probably have disabled inheritance, but I have no privileges on these 5 child folder, hence I cannot alter the permissions.

On the Security tab of a child folder's properties, I get "You must have Read permissions to view the properties of this object". If I continue to Advanced, it says "Owner: Unable to display current owner", and if I try to change this, I get "You do not have permission to view or edit this object's permission settings".

I have tried using takeown /F * on folder P run as an administrator, but I get "Access is denied" on each child folder. I have tried various icalcs commands on the on the child folders (also run as an administrator), but I get "Access is denied" on each child folder. I have run chkdsk /F and restarted to no avail.

How do I delete these 5 child folders?

Janus Engstrøm avatar
ke flag
Also tried running the takeown command using SysInternal's PcExec tool (as described here: https://theitbros.com/using-takeown-exe-command-to-take-ownership-of-file-or-folder/) to run the command as NT AUTHORITY\SYSTEM, but I still get Access Denied on the 5 folder
Score:1
ke flag

Oh, the folders were in use! Using the Find-functionality of Process Explorer to search for services locking the folders, I found out that one of my programs had registered the folders on a Watcher-service, hence prohibiting me from accessing or deleting the folders. I had performed a server restart to clear any processes/services, but problem did not disappear - as my program of course was restarted as well!

So problem was two-fold: Both I had lost privileges on the folders and couldn't use takeown to correct this, as the folders were also in use.

Score:0
ar flag

Open an elevated cmd prompt (as Administrator) and run the following two commands, change C:\Bad to the relevant folder path. This will grant the Administrators group Ownership and restore inherited permissions.

takeown /A /R /F C:\Bad /D Y
icacls C:\Bad /Reset /T /C
Janus Engstrøm avatar
ke flag
jfrmilner, thank you for your reply. I have tried takeown with your parameters, but I still get "INFO: Access is denied" for each of the 5 folders in question.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.