mirror of
https://github.com/linuxserver/docker-heimdall.git
synced 2025-10-26 18:53:40 +09:00
fix permission logic
This commit is contained in:
@@ -174,6 +174,7 @@ Below are the instructions for updating containers:
|
||||
|
||||
## Versions
|
||||
|
||||
* **01.04.19:** - Fix permission detect logic.
|
||||
* **26.03.19:** - Install Heimdall during container start to prevent delayed start due to overlayfs bug with recursive chown.
|
||||
* **23.03.19:** - Switching to new Base images, shift to arm32v7 tag.
|
||||
* **15.03.19:** - Clarify docker image tags in readme.
|
||||
|
||||
@@ -49,6 +49,7 @@ app_setup_block: |
|
||||
|
||||
# changelog
|
||||
changelogs:
|
||||
- { date: "01.04.19:", desc: "Fix permission detect logic." }
|
||||
- { date: "26.03.19:", desc: "Install Heimdall during container start to prevent delayed start due to overlayfs bug with recursive chown." }
|
||||
- { date: "23.03.19:", desc: "Switching to new Base images, shift to arm32v7 tag." }
|
||||
- { date: "15.03.19:", desc: "Clarify docker image tags in readme." }
|
||||
|
||||
@@ -42,10 +42,11 @@ sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
|
||||
|
||||
# function to randomly sample 5 files for their owner and only chown if not abc
|
||||
chowner () {
|
||||
files=(${1}/*)
|
||||
for i in {1..5}; do
|
||||
files=(${1}/**)
|
||||
for i in {1..50}; do
|
||||
user=$(stat -c '%U' $(printf "%s\n" "${files[RANDOM % ${#files[@]}]}"))
|
||||
if [ "${user}" != "abc" ]; then
|
||||
echo "chowning /config"
|
||||
chown -R abc:abc ${1}
|
||||
break
|
||||
fi
|
||||
@@ -54,6 +55,7 @@ done
|
||||
|
||||
# permissions
|
||||
echo "Setting permissions"
|
||||
shopt -s globstar
|
||||
abc_dirs=( \
|
||||
/config \
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user