Access is denied for Copy job to write to a protected network share target, such as a NAS share (error in Copy job Log: "caused by exception Win32ErrorCode : Function: CreateDirectory, error = 0x8007052E, The user name or password is incorrect.").
NovaBACKUP
This guide is only applicable to the Copy function in NovaBACKUP (the Copy tab). The example utilizes a typical Buffalo NAS device and share, which will normally be a protected share, for where to Copy to, in that case. This could be any NAS device share though in reality, or even the typical Windows network share even to run into this issue, which we have a workaround for.
If you receive the Copy job Log error "<exception xml:space="preserve">exception FileSystemException : Cannot create directory '\\LS210D519\Share\Copy to', and after that ".. caused by exception Win32ErrorCode : Function: CreateDirectory, error = 0x8007052E, The user name or password is incorrect." when attempting to run your Copy job, that is using a protected network share as the target path to copy to, then you will need to do the following:
This is a permissions issue, even though it doesn't seem like anything is entered incorrectly and the user should have full access. This is common with Copy Jobs that utilize a a network share as the target path to copy to (such as a protected NAS share as the target path that is utilized in the Copy job), To resolve this you will need to set the Copy job in NovaBACKUP to run the job as a new local administrator account (or a new domain administrator account if working on a Domain Controller, if the network share is active directory aware for the latter case):
- First verify on the Buffalo NAS share, inside the admin website for that Buffalo NAS, what user has full control Read/Write/Modify access to that Share path that your Copy job uses as the target path, and typically on a Buffalo NAS that would at least be the user named "admin". However, it is up to you right now if you want to create a new user that is only meant for the NovaBACKUP application to have access to that share, or just utilize an existing user for that purpose.
- You will now need to decide if you want to utilize an already existing user on the network share machine or device (such as in this example which is a Buffalo NAS device), if you want to use the built in "admin" user that is on a typical Buffalo NAS, which is an admin user, that does have full control rights to the share in question that your Copy job uses as the target share, as that must exist correctly on the NAS share first, you have to decide that now, as the next step will have you create that same user in Windows on the backup client machine that runs those two Copy jobs in that case. If you want to create a new user JUST for this one purpose of backup, you can create a new user on the NAS side and assign him to that same NAS share, with full control R/W/D access, such as "backup_service" for the username, and set a password, and add him to the Admin group on the NAS.
- Use the 'lusrmgr.msc' command (Control Panel > Users) in Windows to create a NEW local administrator user account (or use the 'ADUC' app to create a new domain administrator user account if working on a Domain Controller) on the system that NovaBACKUP is running on, with the same username and password as on the NAS share in question, and assign the same password as the NAS has for that new user; the password for this account cannot be blank. Make sure that new user is added to the "Administrators" group after it is created.
- In the backup client GUI switch to the "Copy" tab and do an "Open" command to locate and then open to be able to edit each Copy job that does utilize that same newtork share as the target path of the Copy job, that you get the access denied to CreateDirectory error on, and with that Copy job open go to "Settings" at the bottom of the Copy tab, and then click on the "Run As" tab, and change the "Run As" setting in the Copy job to set it to use "Run As Specified User" and then specify the correct username and password for the user that you created in Step 3, and then save the Copy job.
- Repeat that Step # 4 for any other Copy jobs that do utilize that same network share and required user to be able to write to the target and work.
- Run the Copy job(s), one at a time, and they should work now, now that they have the required permission to write to the target path.
- If on Step 6 for running the Copy job you still run into an issue, you will first need to confirm if the errors are the same as what you were seeing before. And if it is the same errors as before then you will next need to confirm that the target Copy to path in the Copy job is defined properly, and that the target share and folder actually exists at the target, and that either the existing or new user on the NAS that you dealt with in Step 2 is A. added to the share in question, and B. has the needed Read/Write/Modify access on that share as well, even if he does exist as a user on that share; and then run the Copy job again after that. If the error is different then there must be something else wrong other than the permissions to write to the target share path.
Note: A way to know if your Copy job is using the "Run As Specified User" setting, or is using the "Run As Logged In User" setting (which will likely never work for a Copy job that is using a target path that is a network share, such as a NAS share for the latter) then you can also open the Copy job .nbk script file to view the "[jobInfo]" section of that file near the top, and it will contain the line of text "RunAsLoggedIn" and if that is set to "RunAsLoggedIn=1" that means that the Copy job is set to run as the logged in user to Windows, which likely will not have the necessary permissions to write to a network share in that case. If it is set to "RunAsLoggedIn=0" then it must also have the two other lines of text "RunAsUser" and "RunAsPassword" variable values configured properly, which you can only do via the backup client in the Copy Job > Settings dialog area.
This should resolve this issue.