Fix File Ownership / Readonly Attribute

Published on Thursday, 25 July 2019

[to do: import from wordpress, requires linking 7 images]


some programs cannot access certain file/folder, we need to reset permissions,

for transferring ownership to current user we will still need an elevated prompt,

$ takeown /f D:\PFiles_x64 /r

for removing readonly, we can also use Set-ItemProperty,

$ Set-ItemProperty file.txt -name IsReadOnly -value $false


  1. SO - How to remove readonly attribute using powershell