swift-rsyncd: don't recursively chown /srv/node at startup

Instead of doing a recursive chown on /srv/node, chown only /srv/node
and any immediate subdirectory under /srv/node.

Change-Id: I8fd93fa77ba9fc63910360300b8783a34bd4e6d5
Closes-Bug: #1851169
(cherry picked from commit 2d122afaf9)
This commit is contained in:
Martin Chlumsky 2019-11-04 13:46:49 -05:00 committed by Martin Chlumsky
parent 8b4cae2322
commit 78762fabbd
2 changed files with 3 additions and 3 deletions

View File

@ -1,3 +1,3 @@
swift ALL=(root) NOPASSWD: /bin/chown -R swift\:swift /srv/node
swift ALL=(root) NOPASSWD: /usr/bin/chown -R swift\:swift /srv/node
swift ALL=(root) NOPASSWD: /bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+
swift ALL=(root) NOPASSWD: /usr/bin/find /srv/node/ -maxdepth 1 -type d -execdir chown swift\:swift {} \\+
swift ALL=(root) NOPASSWD: /var/lib/kolla/venv/bin/swift-rootwrap /etc/swift/rootwrap.conf *

View File

@ -1,4 +1,4 @@
#!/bin/bash
sudo chown -R swift:swift /srv/node
sudo find /srv/node/ -maxdepth 1 -type d -execdir chown swift:swift {} \+
mkdir -p /var/lib/swift/lock