mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
commit
7745905cae
@ -72,7 +72,10 @@ do
|
|||||||
|
|
||||||
if [ "$DO_CHOWN" = "1" ]; then
|
if [ "$DO_CHOWN" = "1" ]; then
|
||||||
# ensure proper directories permissions
|
# ensure proper directories permissions
|
||||||
chown -R "$USER:$GROUP" "$dir"
|
# but skip it for if directory already has proper premissions, cause recursive chown may be slow
|
||||||
|
if [ "$(stat -c %u "$dir")" != "$USER" ] || [ "$(stat -c %g "$dir")" != "$GROUP" ]; then
|
||||||
|
chown -R "$USER:$GROUP" "$dir"
|
||||||
|
fi
|
||||||
elif ! $gosu test -d "$dir" -a -w "$dir" -a -r "$dir"; then
|
elif ! $gosu test -d "$dir" -a -w "$dir" -a -r "$dir"; then
|
||||||
echo "Necessary directory '$dir' isn't accessible by user with id '$USER'"
|
echo "Necessary directory '$dir' isn't accessible by user with id '$USER'"
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user