Windows 10: takeown problem

Discus and support takeown problem in User Accounts and Family Safety to solve the problem; Hi I have Windows 10 v1511 Enterprise 64 bit with two Microsoft account. From the Command Prompt (run as administrator), I tried to write... Discussion in 'User Accounts and Family Safety' started by balubeto, Jan 15, 2016.

  1. balubeto Win User

    takeown problem


    Hi

    I have Windows 10 v1511 Enterprise 64 bit with two Microsoft account.

    From the Command Prompt (run as administrator), I tried to write

    Code: takeown /S localhost /U "<Microsoft_account_(E-Mail_Address)>" /P <User_password>" /F "<Directory_path>" /R /A /D Y[/quote] but I get the "Access Denied" error. Why?

    Thanks

    Bye

    :)
     
    balubeto, Jan 15, 2016
    #1

  2. windows.old

    Sorry people, NO RESULT.

    Even with CCleaner NOWAY,

    The problem is the dam .{682B3199-76C3-4745-B7AE-FC13F6676421} FILE in the Temp map.

    In the DOS prompt with

    Takeown/F C:\Windows.old\Users\

    janh\

    AppData\

    Local\

    Temp\.{682B3199-76C3-4745-B7AE-FC13F6676421}

    This file even with Takeown is NOT deleteable

    Regards,

    Jan
     
    JanH440524, Jan 15, 2016
    #2
  3. \Boot\BCD Error 0xc000000f Can't boot Windows 10

    Copying from the problem partition to a new area should be fine.

    I usually use File Explorer to take ownership and change permissions. It looks like with takeown.exe, you could use:

    takeown /F * /R /D Y

    to gain rights to the folder and all files in it.

    Takeown options are explained with takeown /?

    /F * is all files

    /R is for subdirectories

    /D Y is Default answer used when the current user does not have the "list folder" permission on a directory. This occurs while operating recursively (/R) on sub-directories. Valid values "Y" to take ownership or "N" to skip.

    Then you could probably see everything in File Explorer.
     
    Don Cuthbert, Jan 15, 2016
    #3
  4. takeown problem

    I don't know answer to your question, but the easiest (best) way to take ownership is to use Brink's registry hack which will add "Take Ownership" to the file/folder context menu.

    I have attached a copy with two others that are very useful.

    :-
     
    Hairy Scot, Jan 15, 2016
    #4
  5. balubeto Win User
    If I write the net user command, the profile names of the Microsoft accounts are displayed.

    If, however, I write

    Code: takeown /S localhost /U "<Account_profile_name>" /P "<Password>" /F "<Directory_path>" /R /A /D Y[/quote] Windows indicates that this user does not exist.

    Also, if I try to activate the hidden administrator

    Code: net user Administrator /Active:yes net user Administrator "<Password>"[/quote] and then I try to write

    Code: takeown /S localhost /U Administrator /P "<Password>" /F "<Directory_path>" /R /A /D Y[/quote] Windows always indicates that this user does not exist.

    So, how should I use the /U option of takeown?

    Thanks

    Bye
     
    balubeto, Jan 16, 2016
    #5
  6. lx07 Win User
    The /U switch is only applicable to remote computers and so you are trying to change the ownership on a remote computer called localhost which almost certainly doesn't exist.

    Even if you specify the name of your local PC (not localhost) you'll get an error WARNING: User credentials cannot be used for local connections.

    It isn't clear what you are attempting here as you seem to be trying to change the owner to the built in Administrator user and also the Administrators group with the /A switch.

    Assuming you want to change the owner to built in administrator you have various options. Code: runas /user:Administrator "takeown /F "<file path> /R""[/quote] or, if you prefer probably a better solution is Code: icacls "<folder path>" /setowner Administrator /t[/quote]
     
  7. balubeto Win User
    or, if you prefer probably a better solution is Code: icacls "<folder path>" /setowner Administrator /t[/quote] [/quote] If, from the command prompt (run as administrator), I had to write

    Code: takeown /F "<Directory_path>" /R /A /D Y icacls "<Directory_path>\*" /setowner Administrators /t icacls "<Directory_path>\*" /grant:r Administrators:F /t del /s /q "<Directory_path>\*.*" pushd "<Directory_Path>" && ( rd /S /Q "<Directory_Path>\" 2>nul & popd )[/quote] I could delete the entire content of the directory structure even if its owner does not have read rights? If not, how do I remove this content?

    Thanks

    Bye
     
    balubeto, Jan 16, 2016
    #7
  8. balubeto Win User

    takeown problem

    I always get the "Access Denied" error when I run the commands icacls. Why?

    It is possible to delete all the DACLs of this subdirectory, its files and its subdirectories and then give them those of its home directory? If so, how do I do this?

    Thanks

    Bye
     
    balubeto, Jan 18, 2016
    #8
  9. lx07 Win User
    You have been asking the same question here and on other sites for months. Authority is quite simple. To do something with an object you must have authority to do it. Either you do or you don't.

    To grant authority to some object you must either be the owner or have authority to do so.

    The simplest way therefore is to take ownership (with takeown) and then grant yourself authority with icacls.

    You do not need to change authority to someone else (either Administrator or the Administrators group)

    I do have to wonder though (when you could have just typed in /?) why you keep asking the same question.

    You are making it far more complex than it is. All you need to do is take ownership, change authority and do what you want.

    That is all.

    If you have a specific problem then post the error message (and what you are trying to do and why) and we will see if we can figure it out.
     
  10. balubeto Win User
    I think I found the best solution to remove a directory structure which also contains symbolic links and with ACLs managed by TrustedInstaller or Authenticated Users or System users:

    Code: takeown /F "<Directory_path>" /A /R /D Y /SKIPSL >nul 2>&1 icacls "<Directory_path>" /reset icacls "<Directory_path>" /grant:r Administratorstakeown problem :(OI)(CI)F /inheritance:e /Q /C /T /L >nul 2>&1 pushd "<Directory_path>" && ( rd /S /Q "<Directory_path>" 2>nul & popd )[/quote] Many thanks to all

    Bye
     
    balubeto, Jan 25, 2016
    #10
  11. lx07 Win User
    Glad you got it working *Thumbs

    Are you sure about that first command though?

    Perhaps you aren't using English but /D S means you are defaulting S. Should it not be Y or N?
     
  12. balubeto Win User
    Right. Now, I correct it.

    Thanks

    Bye
     
    balubeto, Jan 26, 2016
    #12
  13. balubeto Win User

    takeown problem

    Since the /d option value of the takeown varies according to the language of Windows, how do I make sure that this command works properly for each language?

    Thanks

    Bye
     
    balubeto, Feb 1, 2016
    #13
  14. lx07 Win User
    Don't test languages. Change your current code page with chcp and write it whatever language you want.

    For example chcp 437 and write the rest in English.
     
Thema:

takeown problem

Loading...
  1. takeown problem - Similar Threads - takeown problem

  2. I recently did a takeown command on my c drive and program files x86 folder and now some...

    in Windows 10 Gaming
    I recently did a takeown command on my c drive and program files x86 folder and now some...: I am trying many things to fix But none work help please I am use windows 11 https://answers.microsoft.com/en-us/windows/forum/all/i-recently-did-a-takeown-command-on-my-c-drive-and/395f660d-0e4c-4ae7-98cd-5e456d4e58b8
  3. I recently did a takeown command on my c drive and program files x86 folder and now some...

    in Windows 10 Software and Apps
    I recently did a takeown command on my c drive and program files x86 folder and now some...: I am trying many things to fix But none work help please I am use windows 11 https://answers.microsoft.com/en-us/windows/forum/all/i-recently-did-a-takeown-command-on-my-c-drive-and/395f660d-0e4c-4ae7-98cd-5e456d4e58b8
  4. C:\Windows\System32>takeown/F K: ERROR: Access is denied.

    in Windows 10 Gaming
    C:\Windows\System32>takeown/F K: ERROR: Access is denied.: I was trying to use Backer to back up my user files from a HDD G: to a USB memory stick, K:. I do this fairly regularly without problems. In the meantime, I have changed computer and OS from Win10 to Win11, and reassigned the various HDDs.However, I got a message that one...
  5. C:\Windows\System32>takeown/F K: ERROR: Access is denied.

    in Windows 10 Software and Apps
    C:\Windows\System32>takeown/F K: ERROR: Access is denied.: I was trying to use Backer to back up my user files from a HDD G: to a USB memory stick, K:. I do this fairly regularly without problems. In the meantime, I have changed computer and OS from Win10 to Win11, and reassigned the various HDDs.However, I got a message that one...
  6. TAKEOWN /F X:\ /R /D Y fails

    in Windows 10 Gaming
    TAKEOWN /F X:\ /R /D Y fails: permission to this failsi have removed linux support from my system and virtual system support, but access to usb drives is blocked and changing ownership is blockedwindows 11...
  7. TAKEOWN /F X:\ /R /D Y fails

    in Windows 10 Software and Apps
    TAKEOWN /F X:\ /R /D Y fails: permission to this failsi have removed linux support from my system and virtual system support, but access to usb drives is blocked and changing ownership is blockedwindows 11...
  8. Takeown failing to own folder.

    in Windows 10 Gaming
    Takeown failing to own folder.: So I have this old account that I don't use on my local drive C: and want to delete it.But I can't because I don't have permission. I used the takeown command with cmd.Cmd running as Administrator and using the command: takeown /f <folder> /r /d yThe error I get is "INFO:...
  9. Takeown failing to own folder.

    in Windows 10 Software and Apps
    Takeown failing to own folder.: So I have this old account that I don't use on my local drive C: and want to delete it.But I can't because I don't have permission. I used the takeown command with cmd.Cmd running as Administrator and using the command: takeown /f <folder> /r /d yThe error I get is "INFO:...
  10. Undo Takeown command

    in Windows 10 Network and Sharing
    Undo Takeown command: Using command line, with Takeown, I changed ownership of all Local files to administrator and now some apps stopped working. Is there a way to undo that? https://answers.microsoft.com/en-us/windows/forum/all/undo-takeown-command/a00e0da6-442d-460f-b670-7c5eb364b8dd