Ensure a file or directory has the specified ownership and modification parameters
This module ensures that a path has the specified ownership and modification flags.
(attrs options)
options
A hashmap of options
Option | Description |
---|---|
:path type string | The location of the file or directory to operate on |
:owner type integer string | The user that should have ownership over the file or directory. Can be specified as the username or the user id. |
:group type integer string | The group that should have ownership over the file or directory. Can be specified as the groupname or the group id. |
:mode type integer string | Set the access mode of this file or files. 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"). |
:dir-mode type integer string | Set the access mode of any directory or directories. User when settings attributes recursively. 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"). |
:recurse type boolean | Recurse into subdirectories and set the attributes of all files and directories therein. |
(attrs {:path "/var/www/mysite.mydomain"
:owner "www-data"
:group "www-data"})