mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use find instead of -R for recursive setfacl (#16340)
(-R is not present on Solaris or freebsd setfacl) Fixes #16322
This commit is contained in:
parent
a5046a3ffe
commit
6cb8fdeaf2
1 changed files with 4 additions and 3 deletions
|
@ -91,10 +91,11 @@ class ShellBase(object):
|
|||
mode = pipes.quote(mode)
|
||||
user = pipes.quote(user)
|
||||
|
||||
cmd = ['setfacl']
|
||||
cmd = ['setfacl', '-m', 'u:%s:%s' % (user, mode)]
|
||||
if recursive:
|
||||
cmd.append('-R')
|
||||
cmd.extend(('-m', 'u:%s:%s %s' % (user, mode, path)))
|
||||
cmd = ['find', path, '-exec'] + cmd + ["'{}'", "';'"]
|
||||
else:
|
||||
cmd.append(path)
|
||||
|
||||
return ' '.join(cmd)
|
||||
|
||||
|
|
Loading…
Reference in a new issue