none
Take ownership of a folder RRS feed

  • Question

  • Hi,

    I can't take ownership of a folder in my domain, when I try to change the owner (to domain admins group) it allows me but once I apply the change it says that it's impossible to stablish a new owner of the folder.

    Can anybody whether there is another way to take the control of that folder?

    Thanks in advance.

    Regards.

    Wednesday, November 27, 2019 4:31 PM

All replies

  • You need to have administrator rights on the machine that hosts the folder. 

    Log on to server/pc and search for cmd.exe. Select "run as administrator". Then run "takeown /a /f C:\TheFolderYouWantToOwn".  

    That will set the owner to the Administrators group, and you can then correct the file security to grant appropriate access. 

    Edit: spellcheck changed takeown to takedown. I have correct this. 
    • Edited by MotoX80 Thursday, November 28, 2019 5:59 PM
    Wednesday, November 27, 2019 8:25 PM
  • Try R.click on a folder/file,Properties/Security tab/edit.Also,in cmd type: services.msc in msc,double click on a service,edit it's Log On tab,enter a security setting for users.Also,if a folder-file refuses youre Administrator settings,start pc in safe-mode/normal or cmd,in cmd,locate Parental Software/set to disable,exit,make sure the account has Parental Software unchecked in user account.
    Thursday, November 28, 2019 1:27 AM
  • Hi,

     

    Is your domain admin account part of the local admin group?

     

    Try the steps below to take owner ship and give you full rights of a folders and subfolders

    1.- Locate your c:\users\xxx folder

    2.- Right mouse on it | properties | Security | Advanced | Owner | Edit | Choose your ad account | Replace Owner on subcontainers and objects | Apply

    3.- Go back to Permissions tab | change permissions | add your ad account | Full control | Replace all child object permissions with inheritable permissions from this object

     

    Best Regards,

    Farena


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, November 28, 2019 2:24 AM
  • Running the command:

    ERROR: Access is denied

    Thanks.


    Thursday, November 28, 2019 7:41 AM
  • Hi,

    yes my account is part of the ad admin group.

    The first strange thing is that when I open the folder properties, in security I have the following;

    "You must have Read permissions to view the properties of this object"

    "Click Advanced to continue"

    In advance button, if I change the owner and apply this is the popup I get:

    "Unable to set new owner on FOLDER"

    "Access is denied"

    Thanks.

    Regards.

     

    Thursday, November 28, 2019 7:52 AM
  • Hi,

    the folder is not local. This is a network folder and I've tried to change its security from my laptop, from the domain controller, and so on . But the problem is the same.

    Thanks.

    Regards.

    Thursday, November 28, 2019 7:55 AM
  • And if takedown /a /f C:\TheFolderYouWantToOwn" not works, download psexec from sysinternal tools with parameter "-s", this execute the command with System permissions. Had halped me out in the past on a wired fileserver....


    Viele Grüße / Kind regards
    Fabian Niesen
    ---
    Infrastrukturhelden.de (German) - Infrastructureheroes.org (English)
    LinkedIn - Xing - Twitter
    #Iwork4Dell - Opinions and Posts are my own
    My post are provided as they are. Usage is on your own risk.

    Thursday, November 28, 2019 3:15 PM
  • Yes this is a slightly annoying issue,

    if you open advanced, change the owner there it will popup the security message saying you cant do it, but it should in fact do it :) if you close the security window and reopen the owner should have changed.

    Thursday, November 28, 2019 4:47 PM
  • Yes this is a slightly annoying issue,

    if you open advanced, change the owner there it will popup the security message saying you cant do it, but it should in fact do it :) if you close the security window and reopen the owner should have changed.

    It is probably a UAC issue. 

    Log on to the server that hosts the folder with an administrator account. Reference the local drive (d:\SomeFolder) not a UNC path (\\someserver\someshare\comefolder).

    Open an admin command prompt and run this command. This will tell you if you are running a UAC elevated command prompt. 

    whoami /all | findstr S-1-16-12288

    You should get this:

    C:\WINDOWS\system32>whoami /all | findstr  S-1-16-12288
    Mandatory Label\High Mandatory Level                          Label            S-1-16-12288 

    Note, if you have UAC disabled, then I don't know what whoami is going to report. 

    Then run takeown. (Autocorrect messed up my first post.) 

    takeown /a /f C:\TheFolderYouWantToOwn  
    If you get an error, please post the output from takeown back to this thread. 


    Thursday, November 28, 2019 5:58 PM
  • Hi,

     

    Just checking in to see if the information provided was helpful. Please let us know if you would like further assistance.

     

    Best Regards,

    Farena


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Friday, December 6, 2019 6:53 AM