mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[build] fix chmod errors (#72768)
* inherit data permisions * tmp add all-platforms flag * Revert "inherit data permisions" This reverts commitce30dd7b3a
. * silent chmod, move to configure sectino * simplify chown and fix babel cache * rm empty lines * Revert "tmp add all-platforms flag" This reverts commitf1ae815ca9
. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
This commit is contained in:
parent
46dcc0bd49
commit
e9fa2f3542
1 changed files with 20 additions and 9 deletions
|
@ -3,6 +3,22 @@ set -e
|
|||
|
||||
export KBN_PATH_CONF=${KBN_PATH_CONF:-<%= configDir %>}
|
||||
|
||||
set_chmod() {
|
||||
chmod -f 660 ${KBN_PATH_CONF}/kibana.yml || true
|
||||
chmod -f 2750 <%= dataDir %> || true
|
||||
chmod -f 2750 ${KBN_PATH_CONF} || true
|
||||
}
|
||||
|
||||
set_chown() {
|
||||
chown -R <%= user %>:<%= group %> <%= dataDir %>
|
||||
chown -R root:<%= group %> ${KBN_PATH_CONF}
|
||||
}
|
||||
|
||||
set_access() {
|
||||
set_chmod
|
||||
set_chown
|
||||
}
|
||||
|
||||
case $1 in
|
||||
# Debian
|
||||
configure)
|
||||
|
@ -14,6 +30,8 @@ case $1 in
|
|||
adduser --quiet --system --no-create-home --disabled-password \
|
||||
--ingroup "<%= group %>" --shell /bin/false "<%= user %>"
|
||||
fi
|
||||
|
||||
set_access
|
||||
;;
|
||||
abort-deconfigure|abort-upgrade|abort-remove)
|
||||
;;
|
||||
|
@ -28,6 +46,8 @@ case $1 in
|
|||
useradd -r -g "<%= group %>" -M -s /sbin/nologin \
|
||||
-c "kibana service user" "<%= user %>"
|
||||
fi
|
||||
|
||||
set_access
|
||||
;;
|
||||
|
||||
*)
|
||||
|
@ -35,12 +55,3 @@ case $1 in
|
|||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
chown -R <%= user %>:<%= group %> <%= dataDir %>
|
||||
chmod 2750 <%= dataDir %>
|
||||
chmod -R 2755 <%= dataDir %>/*
|
||||
|
||||
chown :<%= group %> ${KBN_PATH_CONF}
|
||||
chown :<%= group %> ${KBN_PATH_CONF}/kibana.yml
|
||||
chmod 2750 ${KBN_PATH_CONF}
|
||||
chmod 660 ${KBN_PATH_CONF}/kibana.yml
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue