summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Calabro <pcalabro@paypal.com>2016-01-28 13:05:10 -0700
committerPaul Calabro <pcalabro@paypal.com>2016-01-28 13:05:10 -0700
commit901d349f459b2ca97e483224da9d2097ba4c2204 (patch)
tree9c6c2d873e4d62866fc467e8d6706511292a6aed
parent01e78bd39bfe32ba2a794ef0aa6a3f86c486f3db (diff)
downloadansible-901d349f459b2ca97e483224da9d2097ba4c2204.tar.gz
Adding a hyphen in the perms pattern section, since doing something like
go=- is a quick way to strip all permissions for non-owners.
-rw-r--r--lib/ansible/module_utils/basic.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py
index b420f18e6e..3ba19886b2 100644
--- a/lib/ansible/module_utils/basic.py
+++ b/lib/ansible/module_utils/basic.py
@@ -929,7 +929,7 @@ class AnsibleModule(object):
def _symbolic_mode_to_octal(self, path_stat, symbolic_mode):
new_mode = stat.S_IMODE(path_stat.st_mode)
- mode_re = re.compile(r'^(?P<users>[ugoa]+)(?P<operator>[-+=])(?P<perms>[rwxXst]*|[ugo])$')
+ mode_re = re.compile(r'^(?P<users>[ugoa]+)(?P<operator>[-+=])(?P<perms>[rwxXst-]*|[ugo])$')
for mode in symbolic_mode.split(','):
match = mode_re.match(mode)
if match: