2

We have a shared folder on our Windows Server (running Server 2012 R2). Someone managed to change the permissions on several sub-folders (a few levels down from the top of the share), and now the server admins are unable to access the folders, change the permissions/ownership, or even see the permissions.

Using Properties in Windows Explorer, the Security tab says "You must have Read permission to view the properties of this object." The Advanced options don't help either, with the same no-permissions error. Also, it says "Unable to display the current owner", and the Change Owner option doesn't work (no permission).

Using the Properties & Security of the parent folder to "Replace all child permission entries" didn't work either.

I've opened a Command Prompt running as an Admin, and tried using the takeown and icacls commands, but neither one is working.

>takeown /a /f foldername
ERROR: Access is denied.

>icacls foldername /reset /t /c
foldername: Access is denied.
Successfully processed 0 files; Failed processing 1 files

(Foldernames removed to protect the innocent.)

Any suggestions on other ways to take ownership back and/or reset the permissions? The server is a VM running in the IT Data Center, so booting into Safe Mode isn't really an option.

  • If it is a VM can you not access the host for console access, to then boot into safe mode? – Drifter104 Jul 11 '16 at 15:45
  • Been a while since I've had this problem. Try PSEXEC -S CMD (to run as System account) then from within that PSEXEC session, invoke TAKEOWN and see if that works. – Clayton Jul 11 '16 at 15:48
  • No, only IT can do that. My team has admin access to the VM itself, not to the underlying VM Server. Hoping to avoid a call to IT and server downtime. – jimtut Jul 11 '16 at 15:49
  • So an account that is a member of the local Administrators group can't change ownership of a folder? If that's the situation then that's pretty unusual - as in I've never heard of that before. – Todd Wilcox Jul 11 '16 at 16:01
  • Todd, that's correct. It has me stumped too! – jimtut Jul 11 '16 at 16:08
4

Turned out that someone had those subfolders "locked" by some Windows process, maybe open Explorer windows. When a weekly cron job tried to remove these temp folders, it got the folders into this strange state. Killing the locks on the folders (Computer Management -> Shared Folders -> Open Files) caused the folders to just disappear!

| improve this answer | |
  • Who'da thunk it? Had the same problem here. In fact, my folder didn't even show there—I merely looked at the list of locked folders. And then it just disappeared. That's a strange one. – InteXX Mar 14 '17 at 3:01
  • I had the exact same problem... deleting files on linux can sometimes corrupt the file permissions for some reason. I found that the only way was to close any program that is even looking or accessing that location. Only then will the files magically disappear. – Thomas Nov 20 '17 at 15:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.