Error: open path_to_file Access is denied

Some files, on Windows, without permission set, cause the error:
error: open file.txt: Access is denied.

But, I can copy or move the file without errors:
ls -la file.txt
---------- 2 Administrators Domain Users 167K Jul 16 2020 file.txt

To mitigate the error, I need to change the permission first.
chmod 755 file.txt

It seems that the restic tries to access the file by permissions without actually reading it.

In the ls output we can see that nobody has permission to read the file. Not even the owner. Run cat file.txt in the terminal while the file has 000 permissions and you will see the same error.

This is a case of “the permissions system is working as intended.”

On Windows, unlike Linux, cat file.txt does not present an error. The contents of the file are displayed correctly.

Odd. I don’t believe that restic checks permissions explicitly before opening a file. “Access is denied” is a Windows-style error message, probably returned from a call to OpenFile/OpenFileA, so I still believe this is just OS-level permissions being applied. Is restic being run as a different user? Is the shell you’re using run with elevated permissions?