Unable to take backup of MSSQL database: Operating system error 5(Access is denied.)

Refers to:

  • Plesk Onyx for Windows
  • Plesk 12.0 for Windows
  • Plesk 12.5 for Windows

Created:

2016-11-16 13:23:05 UTC

Modified:

2017-02-02 16:32:54 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to take backup of MSSQL database: Operating system error 5(Access is denied.)

Symptoms

Unable to take domain backup for MSSQL database.

The following error can be found in the %plesk_dir%admin\\logs\\php_error.log file:

[2015-04-18 12:12:18] ERR [panel] Unable to backup database 'db_'
Cannot open backup device 'C:\\Program Files (x86)\\Parallels\\Plesk\\Backup\\example.com\\databases\\example-182\\123'. Operating system error 5(Access is denied.).
BACKUP DATABASE is terminating abnormally.

(Error code 21):
0: Database.php:487
Db_Table_Row_Database->_executeDbBackupCommand(array, array)
1: Database.php:314
Db_Table_Row_Database->backup(string 'C:\\Program Files (x86)\\Parallels\\Plesk\\Backup\\example.com\\databases\\example-182\\123')
2: class.DbBackupManager.php:224
DbBackupManager->Backup(string '123')
3: client.domain.dbbackup.create.php:82
plesk__client__domain__dbbackup__create->accessItem(string 'POST', NULL null)
4: UIPointer.php:619
UIPointer->access(string 'POST')
5: plesk.php:36

Cause

Insufficient permissions on the %plesk_dir%\\Backup\\ folder for the SQL service user.

Resolution

Set full permissions on the %plesk_dir%\\Backup\\ folder for MSSQL user permanently:

  1. Edit %plesk_dir%etc\\DiskSecurity\\MssqlSecurity.xml adding this string to file:

    <Entries><Entry AccounType="1" Domain="NT Service" Account="MSSQL$MSSQLSERVER2012" Path="[PRODUCT_ROOT_D]" SubPath="Backup" AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0"/><Entry AccounType="1" Domain="NT Service" Account="MSSQL$SQLEXPRESS" Path="[PRODUCT_ROOT_D]" SubPath="Backup" AceFlags="ThisFolderSubfoldersAndFiles" AccessMask="FullAccess" EntryFlags="0"/></Entries>

    where MSSQL$SQLEXPRESS is a user for SQL Sever service .

  2. Run Plesk Reconfigurator > Repair Plesk installation > Plesk File Security to fix other possible permissions issues.

The following articles can be useful:

#213911265 How to customize permissions for Plesk users by "Disk Security"

#213391889 MSSQL does not start: Access is denied while attempting to open or create the physical file tempdb.mdf.

Have more questions? Submit a request
Please sign in to leave a comment.