I am using rsync on mounted volumes from a NAS box onto my Windows 10 laptop with WSL (Debian). In the Debian shell, I mount the shared drive volumes and run rsync to make sure all of the source files (vol1) exist in the destination (vol2).

rsync -av --ignore-existing /mnt/vol1 /mnt/vol2

After running the command on the destination side I have a complete folder structure, but none of the files themselves were copied over. I directed the results into a file and see that the files were included as part of the output, but they were not actually copied. The same command works from my Mac terminal without issue, but I prefer working on my laptop so really want to be able to do this kind of storage management through WSL.

I think it is a permissions problem with Windows because I get failures on the WSL side:

rsync: mkstemp "filepath" failed: Operation not permitted (1)

Is there a fix for permissions on the WSL side when using SMB mounts? I mount the volumes using

mount -t drvfs X: /mnt/s

Lastly, I do use sudo for the rsync command with the same result in the end.

1 Answer 1


It sounds like you are running into a manifestation of this. To summarize, the destination drive is mounted as root, so you don't have permissions there. The solution, as described there, is to simply sudo mount -t drvfs X: /mnt/s -o uid=1000,gid=1000 (replacing the 1000 with your uid/gid if they are different).

In trying it myself without the mount options, I was able to reproduce your problem. When I added the mount options to the destination drive, it worked correctly for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .