Skip to content

Commit

Permalink
Document default permission modes for file module
Browse files Browse the repository at this point in the history
  • Loading branch information
bobrik committed Feb 24, 2017
1 parent 4e2b852 commit 41ef69b
Showing 1 changed file with 39 additions and 9 deletions.
48 changes: 39 additions & 9 deletions salt/states/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,10 @@ def symlink(
mode
The permissions to set on this file, aka 644, 0775, 4664. Not supported
on Windows
on Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
'''
name = os.path.expanduser(name)

Expand Down Expand Up @@ -1284,7 +1287,10 @@ def managed(name,
mode
The permissions to set on this file, aka 644, 0775, 4664. Not supported
on Windows
on Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
template
If this setting is applied, the named templating engine will be used to
Expand All @@ -1307,6 +1313,9 @@ def managed(name,
permissions for those directories. If this is not set, directories
will be assigned permissions from the 'mode' argument.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
replace : True
If set to ``False`` and the file already exists, the file will not be
modified even if changes would otherwise be made. Permissions and
Expand Down Expand Up @@ -1949,11 +1958,17 @@ def directory(name,
dir_mode / mode
The permissions mode to set any directories created. Not supported on
Windows
Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
file_mode
The permissions mode to set any files created if 'mode' is run in
'recurse'. This defaults to dir_mode. Not supported on Windows
'recurse'. This defaults to dir_mode. Not supported on Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
makedirs
If the directory is located in a path without a parent directory, then
Expand Down Expand Up @@ -2290,15 +2305,24 @@ def recurse(name,
dir_mode
The permissions mode to set on any directories created. Not supported on
Windows
Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
file_mode
The permissions mode to set on any files created. Not supported on
Windows
Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
sym_mode
The permissions mode to set on any symlink created. Not supported on
Windows
Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
template
If this setting is applied, the named templating engine will be used to
Expand Down Expand Up @@ -4140,7 +4164,10 @@ def copy(
The permissions to set on the copied file, aka 644, '0775', '4664'.
If ``preserve`` is set to ``True``, then this will be ignored.
Not supported on Windows
Not supported on Windows.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
subdir
.. versionadded:: 2015.5.0
Expand Down Expand Up @@ -4517,7 +4544,10 @@ def serialize(name,
salt is running as on the minion
mode
The permissions to set on this file, aka 644, 0775, 4664
The permissions to set on this file, aka 644, 0775, 4664.
The default mode for new files and directories corresponds umask of salt
process. For existing files and directories it's not enforced.
backup
Overrides the default backup mode for this specific file.
Expand Down

0 comments on commit 41ef69b

Please sign in to comment.