In Windows (particularly, Windows server 2012) I have to change ownership of a folder with a bunch of subfolders and files.
Here: recursively change owner windows 7 (and in other places) people suggest to use 'takeown' command for that. The problem is that I need to set another user as the owner, not myself. But I don't know their password, as well as I don't want to tell them the admin password so that they can run this command with the administrator privileges on their own.
When I tried to specify a target user to the 'takeown' command: takeown /S 127.0.0.1 /U someuser /F somedir /R
, it has responded that the user credentials cannot be used for local connections.
How can I set another user as a directory/file owner recursively in Windows?