|
Answer» I want to give my user-account the ownership-permissions for a directory. Found two commands both working, what exactly is the difference? Any pro and cons? takeown /r /F "C:\Program Files" icacls "C:\Program Files" /setowner "User" /tTo my KNOWLEDGE, the main difference between takeown and icacls (Integrity Control Access Control LiSt) is that icacls is a more general administration tool that among other things can be used by an administrator to grant ownership of a file or directory to a specified user. Whereas takeown is a more specialized utility that does only that one specific thing, specifically for the user running the command.
Both must be run by an administrator, and both commands shuld do the same thing if "User" is your username. The /t option for icacls is equivalent to the /r option for takeown (recursively grant ownership in subdirectories).
So both commands with those options should be basically the same.Thanks for the help. I TOUGHT so, /t option for icacls is equivalent to /r option for takeown. That's why im confused which command i should use and what will be the difference after all?
Now i used both commands and monitored the terminal, booth seems to be taking ownership just fine but i noticed one option took LONGER than the other and also the commands visible in the terminal did LOOK different from the other.Update:
icacls and takeown are pretty much the same, the only difference i noticed is that takeown needs more time to take ownership than icacls does.
Here to command that works perfectly for me:
icacls "C:\Program Files (x86)" /grant user:F administrators:F /t icacls "C:\Program Files" /grant user:F administrators:F /t icacls "C:\Windows" /grant user:F administrators:F /t pause
|