TAKEOWN [/S system [/U username [/P [password]]]] /F filename [/A] [/R [/D prompt]]
Description:
This tool allows an administrator to recover access to a file that
was denied by re-assigning file ownership.
Parameter List:
/F – Specifies the filename or directory name pattern.
/A – Gives ownership to the administrators group instead of the current user.
/R – Recurse: instructs tool to operate on files in specified directory and all subdirectories.
Examples:
TAKEOWN /?
TAKEOWN /F * /R /A
ICACLS name [/grant[:r] Sid:perm[…]]
Description:
Sid:perm grants the specified user access rights.
Parameter List:
/T – Recurse
Permission List:
N – no access
F – full access
M – modify access
RX – read and execute access
R – read-only access
W – write-only access
D – delete access
Examples:
ICACLS /?
ICACLS * /grant “Administrators:(F)” /T