I tried using robocopy
to mirror a folder to a new location; a few files and folders failed with "Access Denied," although I was using an user in the local admin group, which does have access to these files. (I double checked in the security tab.) These permissions (and adding my user to the admin group) were set up long ago, so it's not a matter of login out and back in.
At first, I thought this was because another process had the file open with a lock; but I tested, and that gives a different error message.
To rule out the possibility of broken permissions, I re-ran the robocopy
command as the SYSTEM user. However, this failed with the same error! For these files, there are two entries listed in the Security tab: the local Administrators group, and the SYSTEM user. Both have full control. How could either user fail to have access?