Security Compliance
CreateDirectory Failed error when publishing updates to WSUS
The following error message appears when trying to publish packages: Package: yourPackage Status: Failure Message: Failed to publish yourPackage. CreateDirectory failed.
First published date
Last published date
Overview
The following error message appears when trying to publish packages:
Package: yourPackage Status: Failure Message: Failed to publish yourPackage. CreateDirectory failed
Product section
Cause
This issue can occur if you move or recreate the UpdateServicesPackages and WSUSContent folders after installing Patch Manager, or explicitly remove the share:
- The permissions on the
UpdateServicesPackagesandWSUSContentfolders are not set correctly. - The
UpdateServicesPackagesandWSUSContentfolders are not shared at all. - Post Install tasks were not completed on the WSUS server in question
Resolution
On your WSUS servers, the WSUSContent and UpdateServicesPackage folders do not have a default location. Typically, it is C:\WSUS or D:\WSUS but is manually specified when the WSUS server is set up.
- Set the security permissions for
WSUSContentandUpdateServicesPackagesas follows:SETTING PERMISSION NT AUTHORITY\SYSTEM Full Control NT AUTHORITY\NETWORK SERVICE Write
Read
Synchronize
Builtin\administrators Full Control Hostname\Wsus Administrators FullControl - Set the share permissions for
WSUSContentandUpdateServicesPackagesas follows:SETTING PERMISSION Builtin\Administrators Full Everyone Read NT Authority\Network Service Full Hostname\WSUS Administrators Full - (Optional) Run the following PowerShell command on the WSUS server to read all the permissions at the same time.
Get-SmbShareAccess -Name UpdateServicesPackages|ft; Get-SmbShareAccess -Name WsusContent|ft;$acl=Get-Acl "\\localhost\WsusContent";$acl|ft AccessToString -Wrap; $acl2=Get-Acl "\\localhost\UpdateServicesPackages";$acl |ft AccessToString -Wrap