Ensure a directory is present
This module ensures a directory is present at the specified path and that it has the specified ownership and modification flags. If parent directories are not present, they are also created.
(mkdir options)
options
A hashmap of options
Option | Description |
---|---|
:path type string | The filesystem location to make the directory at. |
:owner type integer string | The user that should have ownership over the directory. Can be specified as the username or the user id. |
:group type integer string | The group that should have ownership over the directory. Can be specified as the groupname or the group id. |
:mode type integer string | Set the access mode of this directory. Can be specified as an octal value of the form 0xxx, as a decimal value, or as a change string as is accepted by the system chmod command (eg. "u+rwx"). |
(mkdir {:path "/var/www/mysite.mydomain"
:owner "www-data"
:group "www-data"})