none
Unable to change permissions or take ownership of files or directories as administrator

    Question

  • Okay, so here is the situation.  I moved about a TB of files from one file server to another.  I then try and take ownership of the files and set permissions and am confronted with:  

    Access Denied.  

    I try and take ownership: Access Denied.

    I launch explorer and "Run As Administrator" logged in under the local administratior account and try and take ownership: Access Denied

    I run takeown on the files: Access Denied

    I run CMD as administrator and use takeown: SUCESS

    I try and change permissions again on the root folder: Access Denied.  

    I go to one of the folders which is saying "Access Denied" when security is applied and try and do it individually.. SUCESS.  

    So now  I am faced with thousands on thousands (actually millions) of files that have to be individually accessed, ownership taken and then have basic security applied to them (This is applying full permissions to EVERYONE).  What the hell is going on and how can I fix this issue.  I am amazed that the answers to the questions regarding this problem have never been actually answered.  Taking ownership doesn't work.  After taking ownership you STILL get access denied.  No files are open, no previous security exists on the files as they were copied over the network to this location.  No files are set to read only.  No files are set to system files.  I can apply ownership and security directly to each folder and file, but can't propagate rights from the root folder without getting "Access Denied".  This has been tried with: A domain admin account, the local admistrator account, a domain admin account running everything as "Run as Administrator" and the local administrator account running everything as "Run as Administrator" and this is running on a new clean install of Windows Server 2008r2.  Exact same result every single time.

    EDIT:  

    Just ran the following as local administrator in an elevated CMD window:  

    takeown /f * /r /a

    icacls *.* /grant:r everyone:f /t /c /q

    Result: Successfully processed 364 files; Failed processing 2695 files.  In other words: ACCESS DENIED


    Tuesday, March 19, 2013 7:45 PM

Answers

All replies

  • Hi,

    Please check the issue referring to the methods in the following Knowledge Base article:
     
    "Access Denied" or other errors when accessing or working with files and folders in Windows
    http://support.microsoft.com/kb/2623670
     
    Hope this helps.


    Spencer
    TechNet Community Support

    Thursday, March 21, 2013 4:00 AM
    Moderator
  • Mathew,

    Did you ever solve this problem?  I have a very similar problem where I copied files from a WHS v1 (essentially Win Server 2003) to a Win 8 file directory and then couldn't access them.  When I tried takeown as you did, I only had success in taking ownership of some of the folders, but none of the files themselves. The KB article Spencer suggested  does not address the problem.

    Tuesday, July 23, 2013 3:15 AM
  • You may also try Computer Management/Shared Folders/Open Files and close any affected files. For me this solved the problem.
    Tuesday, December 10, 2013 10:42 AM
  • was your access problem solved?

    what was the manufacture and type of computer you were using?

    There is a computer manufacturer which installs software that overrides all of the administrator changes.  So on computers without this software you can make access or ownership changes by right click and on computers with this software it initially may appear that you have gone thought all the usual and customary steps that should work and they fail.

    I just spent a lot of time working on this problem with a HP business computers which had software pre-installed.  This software in its default setting blocked viewing files on attached hard and flash drives.  Both new computers functioned in the same fashion blocking access.  There was no information about this problem to alert or warn consumers.

    Monday, March 10, 2014 8:42 AM
  • I just spent a lot of time working on this problem with a HP business computers which had software pre-installed.  This software in its default setting blocked viewing files on attached hard and flash drives.  Both new computers functioned in the same fashion blocking access.  There was no information about this problem to alert or warn consumers.

    This was the ticket for me... I have an HP machine that was giving Access Denied to a Seagate external hard drive.  It turns out HP's "Just In Time Authentication" settings in the HP Security program was blocking access.  Thank you for pointing me in the right direction.
    Wednesday, September 24, 2014 11:32 PM
  • I'm using a HP Pavillion TouchSmart 14 with Win 8.1 and I am having the same problem - where can I find the solution?
    • Edited by RicardoCO Tuesday, October 07, 2014 5:22 PM
    Tuesday, October 07, 2014 5:22 PM
  • This was it for me as well!
    • Proposed as answer by ezedixon Tuesday, June 13, 2017 7:09 PM
    Wednesday, December 03, 2014 10:50 PM
  • Solution for me was to just dont try to change this on the networkshare (s:\foldera\folderb), than instead in the original location c:\Folderx\Foldera\Folderb !!!!

    Thank you microsoft for your excellent bullshit!

    Thursday, January 08, 2015 11:23 AM
  • my generic solution: have a dual-boot into LINUX (MINT).

    from Linux, mount the windows drive,

    then you can manipulate the filesystem unrestrictedly.

    much quicker than finding 'the answer' within microsoft...

    enjoy!

    Friday, January 09, 2015 3:50 AM
  • a generic solution is to install a dual-boot with LINUX (MINT).

    then from within LINUX, mount the Windows drives, and you can do anything with the filesystem.

    Friday, January 09, 2015 3:57 AM
  • You may also try Computer Management/Shared Folders/Open Files and close any affected files. For me this solved the problem.

    This worked for me also.  A user had the file open.  Closing his connection to the file fixed the issue.
    • Proposed as answer by Petchie Wednesday, December 02, 2015 4:18 AM
    Friday, April 10, 2015 5:35 PM
  • Make sure you change the owner to yourself (ie the currently logged in user) not another account, as then you won't be able to iterate through subfolders as ownership is taken.
    Thursday, February 25, 2016 10:05 PM
  • I tend to run into this issue sometimes; and it's usually because something else has access or is accessing it.  In my case it was either I had a command prompt open and in that directory; or in my virtual machines had a shared folder accessing it and enabled.  Once I disabled the shared folders and close any command prompts that may be in that folder I can delete or whatever.
    • Edited by playersnoopy Wednesday, July 27, 2016 11:52 PM typo
    Wednesday, July 27, 2016 11:50 PM
  • this is probably the only solution presented here

    Business Intelligence Devolper

    Thursday, August 18, 2016 12:02 PM
  • This helped, thank you.


    Tuesday, October 11, 2016 10:18 PM
  • In case anyone is still having the problem one easy method to determine whether any HP or other preinstalled software is interfering with administrative privileges for flash or external drives is to perform a clean boot.  The clean boot is easy and a quick method:

    1) click windows and r keys simultaneously and enter msconfig

    2) click on the services tab

    3) click on hide all Microsoft services

    4) click on disable all

    5) click ok

    6) reboot

    7) check to see the administrative privileges or performance changes

    To determine which software is the culprit software out of the items unchecked perform the following steps:

    1) click windows and r keys simultaneously and enter msconfig

    2) count the number of non Microsoft services that have unchecked boxes.

    3) check 1/2 of these boxes and reboot

    4) check to see administrative privileges or performance changes

    5) if there was no change then check the next group (1/2 of the remaining boxes)

    6) if there was a change then you know which group the problem software is in

    7) keep repeating these steps until you eliminate all the non-culprit software and isolate the culprit software.

    Once you identify the problematic software you can then perform a selective boot and uncheck the box for this software.  If you do not anticipate using this software again then you can use the control panel to uninstall it and return to a normal startup.

    Monday, April 03, 2017 7:24 AM