mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 06:00:46 +00:00
Handle extreme edge case of ASF_USER=root
This commit is contained in:
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ done
|
||||
|
||||
BINARY_PREFIX=""
|
||||
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1; then
|
||||
if [ -n "${ASF_USER-}" ] && [ "$(id -u)" -eq 0 ] && id -u "$ASF_USER" >/dev/null 2>&1 && [ "$(id -u "$ASF_USER")" -gt 0 ]; 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" || true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user