I ran a backup into a folder. The Network Service has full control access to this folder. The backup process didn't work until I granted that account full control.
I try to restore that same file but I get an error
Operating system error 5 (failed to retrieve text for this error. Reason: 15105).
If I move the file to the instance's actual folder it restores fine, so the file itself is not bad.
Is there something slightly different in the folder rights needed to run a backup versus a restore? What is that difference? FYI, I am doing all this programmatically using a C# application. To test the above backup/restore, I've used the server management tool.
The user access was done via the C# code, though. Here is the main line:
I connect to the database using a SQL Server authenticated user, not a Windows user, so I can't add the 'logged in' user as full control to the folder.