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

10/26/2018 8:50 PM

Last published date

10/26/2018 8:50 PM

Overview

The following error message appears when trying to publish packages:

Package: yourPackage
Status: Failure
Message: Failed to publish yourPackage. CreateDirectory failed

Product section

Patch Manager

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 UpdateServicesPackages and WSUSContent folders are not set correctly.
  • The UpdateServicesPackages and WSUSContent folders 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.

 

  1. Set the security permissions for WSUSContent and UpdateServicesPackages as follows:
    SETTINGPERMISSION
    NT AUTHORITY\SYSTEMFull Control
    NT AUTHORITY\NETWORK SERVICE

    Write

    Read

    Synchronize

    Builtin\administratorsFull Control
    Hostname\Wsus AdministratorsFullControl
  2. Set the share permissions for WSUSContent and UpdateServicesPackages as follows:
    SETTINGPERMISSION
    Builtin\AdministratorsFull
    EveryoneRead
    NT Authority\Network ServiceFull
    Hostname\WSUS AdministratorsFull
  3. (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