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
552172b141
commit
9d91d2c6b8
1 changed files with 4 additions and 3 deletions
|
@ -90,10 +90,11 @@ class ShellBase(object):
|
||||||
mode = pipes.quote(mode)
|
mode = pipes.quote(mode)
|
||||||
user = pipes.quote(user)
|
user = pipes.quote(user)
|
||||||
|
|
||||||
cmd = ['setfacl']
|
cmd = ['setfacl', '-m', 'u:%s:%s' % (user, mode)]
|
||||||
if recursive:
|
if recursive:
|
||||||
cmd.append('-R')
|
cmd = ['find', path, '-exec'] + cmd + ["'{}'", "';'"]
|
||||||
cmd.extend(('-m', 'u:%s:%s %s' % (user, mode, path)))
|
else:
|
||||||
|
cmd.append(path)
|
||||||
|
|
||||||
return ' '.join(cmd)
|
return ' '.join(cmd)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue