Skip to content

Commit 828db76

Browse files
removed 777 perm (#2811)
1 parent 448fb35 commit 828db76

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

OracleIdentityGovernance/samples/scripts/agentManagement.sh

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -91,12 +91,7 @@ createDir(){
9191

9292
if [ -d "$absoluteVolumePath"/data ]
9393
then
94-
if [ "$(podman --version 2>/dev/null)" ]
95-
then
96-
chmod -R 777 "$absoluteVolumePath"/data >/dev/null 2>&1
97-
else
9894
chmod -R 775 "$absoluteVolumePath"/data >/dev/null 2>&1
99-
fi
10095
fi
10196

10297

@@ -314,9 +309,9 @@ runAgent(){
314309
then
315310
echo "INFO: Starting new container."
316311
if [ -f "$CONFDIR"/config.properties ]; then
317-
podman run -d --env-file "$CONFDIR"/config.properties -v "$PV":/app --group-add "$groupId" --name "$AI" "$imageName"
312+
podman run -d --user root --env-file "$CONFDIR"/config.properties -v "$PV":/app --group-add "$groupId" --name "$AI" "$imageName"
318313
else
319-
podman run -d -v "$PV":/app --group-add "$groupId" --name "$AI" "$imageName"
314+
podman run -d --user root -v "$PV":/app --group-add "$groupId" --name "$AI" "$imageName"
320315
fi
321316

322317
podman exec "$AI" /bin/bash -c 'agent ido validate --config /app/data/conf/config.json; if [[ "$?" != "0" ]] ; then echo VALIDATE_FAILED > /app/data/conf/status.txt; else echo VALIDATE_SUCCESS > /app/data/conf/status.txt; fi ;'
@@ -820,12 +815,7 @@ upgrade()
820815

821816
#createDir changes the current working directory
822817
mkdir -p "${PV}/upgrade"
823-
if [ "$(podman --version 2>/dev/null)" ]
824-
then
825-
chmod -R 777 "${PV}/upgrade" >/dev/null 2>&1
826-
else
827-
chmod -R 775 "${PV}/upgrade" >/dev/null 2>&1
828-
fi
818+
chmod -R 775 "${PV}/upgrade" >/dev/null 2>&1
829819

830820
createDir "${PV}/upgrade"
831821
# shellcheck disable=SC2129

0 commit comments

Comments
 (0)