Announcement

Collapse
No announcement yet.

Cannot open backup device.Operating system error 5(Access is denied.)

Collapse

Unconfigured Ad Widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cannot open backup device.Operating system error 5(Access is denied.)

    Error
    Cannot open backup device 'C:\Users\WPServer\AppData\Local\Temp\TestDB.bak'. Operating system error 5(Access is denied.)

    Cause

    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.

    Solution

    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

    Park B
    Accuwebhosting.com
    Marc_AccuWebHosting
    Member
    Last edited by Marc_AccuWebHosting; 05-19-2016, 09:43 PM.

  • #2
    Here's an alternative:

    In my case, the WPServer already had Read/Write access to the folder. I had to check Server Manager->Tool->Services and find the user ("Log On As" column) for service: SQL Server (SQLEXPRESS).

    It listed "NT Service\MSSQL$SQLEXPRESS", so I went to the local folder (listed above) and added "NT Service\MSSQL$SQLEXPRESS" as the user to give Write permissions.

    Then, I tried to restore the database again from WebsitePanel, and the upload worked! I logged onto my web app and found my database restored successfully.
    You do not have permission to view this gallery.
    This gallery has 2 photos.
    dustinnulf
    Junior Member
    Last edited by dustinnulf; 01-11-2016, 09:38 PM.

    Comment


    • #3
      Thank you for the solution here. I will save this thread for further use.

      Comment


      • #4
        Best Dedicated Servers
        Usually, I make backups using another database for that hosting that allows easy integration and other MySQL features. I've never been experiencing errors like this which is unallowable when you're going for quality database management solutions
        Marc_AccuWebHosting
        Member
        Last edited by Marc_AccuWebHosting; 03-28-2019, 10:47 PM.

        Comment

        Working...
        X

        Sign up for a News Letter Click here to sign up