mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
reducing sample size to 5 for chown logic as it is not recursive
This commit is contained in:
@@ -39,10 +39,10 @@ done
|
||||
# set queue driver to database
|
||||
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
|
||||
|
||||
# function to randomly sample 50 files for their owner and only chown if not abc
|
||||
# function to randomly sample 5 files for their owner and only chown if not abc
|
||||
chowner () {
|
||||
files=(${1}/*)
|
||||
for i in {1..50}; do
|
||||
for i in {1..5}; do
|
||||
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
|
||||
if [ "${user}" != "abc" ]; then
|
||||
chown -R abc:abc ${1}
|
||||
|
||||
Reference in New Issue
Block a user