@Greenfield, Brian
It is a common scenario to robocopy files between file servers. Unfortunately, this scenario is currently broken using AD Authentication for Azure Files. Whenever a request to add a file comes in to Azure Files, if the request is over a Kerberos (authenticated via AD) session, an access check happens to see if the caller has permissions to add a file under the parent directory of the file.
For example, if a user is using robocopy with “/sec”, when robocopy transfers a file to the destination, the following access checks occur.
- Does the AD user executing robocopy have the permission to add a file or directory under the file’s parent? This checks if FILE_ADD_FILE permission is granted to the user in the file’s parent directory.
- Does the AD user executing robocopy have the permission to set an ACL on the file? This checks if the user has WRITE_DAC permission to the file.
- Does the AD user executing robocopy have the permission to set the owner on the file? This checks if the user has WRITE_OWNER permission to the file.
Unfortunately, with check #3, there is currently no AD user that has “Take Ownership” permission on the file share and can set the owner. So if robocopy requires setting the owner, it will fail with access denied.
We understand that this is a hole in our functionality and are working to address it. We are working on a feature that will add a “Take Ownership” RBAC permission for AD users to be authorized for.
In the meantime, the recommended solution for those affected by this missing functionality is to execute any robocopy after mounting the file share using storage account and key. When a user mounts via storage account and key, they mount as “super-users” and all access checks are skipped.
Hope this helps! Let us know if you have further questions or issues.
-------------------------------
Please don’t forget to "Accept the answer" and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.