Cannot open backup device 'C:\Users\WPServer\AppData\Local\Temp\TestDB.bak'. Operating system error 5(Access is denied.)
Sometimes you face an error while taking a backup of MSSQL database from WebsitePanel. This is nothing but related with the permission of WebsitePanel user (WSPServer). An error message will look like following:
Error backing up SQL Server database
Technical Details [Collapse]
Page URL: http ://192.168.3.1:9001/Default.aspx...D=61&SpaceID=4
Logged User: serveradmin
Work on Behalf: AdminUser
Hosting Space: 4
Stack Trace: System.Web.Services.Protocols.SoapException: oapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: Cannot open backup device 'C:\Users\WPServer\AppData\Local\Temp\TestDB.bak'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.
1.Login to your VPS via RDP
2.Open Computer and navigate to C:\Users\WPServer\AppData\Local\
3. Right click on Temp folder, go to Security tab and click on Edit permissions. Here, you will find WSPServer user, give Write permission to WSPServeuser
4.Now, again attempt to take MSSQL Database backup from WebsitePanel