diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index 1da60ac381..a4af68ef8b 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -928,7 +928,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[ugoa]+)(?P[-+=])(?P[rwxXst]*|[ugo])$') + mode_re = re.compile(r'^(?P[ugoa]+)(?P[-+=])(?P[rwxXst-]*|[ugo])$') for mode in symbolic_mode.split(','): match = mode_re.match(mode) if match: