Tuesday, 10 March 2015

Take ownership of file and retain existing permissions

If you are in a situation where you are not the current owner of a file and currently have no read permission as well you will be aware that when attempting to take ownership of the folder you will recieve the following warning prompt:

"You do not have permission to read the contents of directory folder name. Do you want to replace the directory permissions with permissions granting you Full Control?"

Proceeding will wipe all existing permissions and create a single entry for yuorself in the ACL list! We would like to retain all of the existing permissions - to do this we can make use of PowerShell as demonstrated here.

For archiving purposes you can also download the script here.


Post a Comment