Folder Not Accessible after Cancellation of Robocopy

I was planning for our server migration. One job is migrating the files to the new server. I used robocopy to copy the files. Half way through the process, I found something wrong and cancelled the robocopy process. One problem after the cancellation of robocopy is that I can no longer access the remote folder. I tried to use the Windows explorer to take the ownership, but failed. It’s probably because I am not the admin of the remote server.

I vaguely remembered that I had this problem before, but I could not find my note. I thought I used cacls to fix the problem, but I was not sure. I checked my old script and found a solution. Here are the steps to fix the problem.

  1. Elevate a command prompt. If you are not familiar with it, just search Command Prompt in the search box. Once you see the Command Prompt program, right click on it and select Run as administrator.
  2. Enter the following command and press Enter:
    cacls \\remote_server\remote_share\remote_dir /e /T /g username:F


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.