diff --git a/lib/cdist/util/fsproperty.py b/lib/cdist/util/fsproperty.py
index 68d5edaa..50b95ea2 100644
--- a/lib/cdist/util/fsproperty.py
+++ b/lib/cdist/util/fsproperty.py
@@ -221,6 +221,8 @@ class DirectoryDictProperty(DirectoryDict):
     def __set__(self, obj, value):
         self._set_path(obj)
         if value is not None:
+            # create directory if it doesn't exist
+            os.makedirs(self.path, exist_ok=True)
             for name in self.keys():
                 del self[name]
             self.update(value)