chown operation done by ASF is not mandatory for following with the rest of the script. It can fail e.g. for read-only filesystems, which is completely fine, worst case user will have to deal with the mess he has created himself.
This commit is contained in:
JustArchi
2022-10-11 16:30:38 +02:00
parent ee9d145e6b
commit 254a0960ae
6 changed files with 6 additions and 6 deletions

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi

View File

@@ -69,7 +69,7 @@ BINARY_PREFIX=""
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
# Fix permissions first to ensure ASF has read/write access to the directory specified by --path and its own
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR"
chown -hR "${ASF_USER}:${ASF_USER}" . "$SCRIPT_DIR" || true
BINARY_PREFIX="su ${ASF_USER} -c"
fi