Permission denied when copying files on Windows

Use takeown to take ownership of the file

takeown /r /d y /f *

^ Recursively takes ownership of all files without prompting “are you sure”.

Follow it up with icacls set the access control list

icacls * /grant Everyone:F /t /c /q

This will recursively grant Full access to user group “Everyone” to all files in the folder.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>