Skip to content

Commit 90846ed

Browse files
Apply suggestions from code review
Co-authored-by: Siegfried Weber <[email protected]>
1 parent d42ef14 commit 90846ed

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

nifi/Dockerfile

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,9 @@ ln -s /stackable/stackable-bcrypt.jar /bin/stackable-bcrypt.jar
121121
ln -s /stackable/nifi-${PRODUCT} /stackable/nifi
122122

123123
# fix missing permissions / ownership
124-
chown -h ${STACKABLE_USER_UID}:0 /stackable/nifi
125-
chmod -R g=u /stackable/python
126-
chmod -R g=u /stackable/bin
124+
chown --no-dereference ${STACKABLE_USER_UID}:0 /stackable/nifi
125+
chmod --recursive g=u /stackable/python
126+
chmod --recursive g=u /stackable/bin
127127
chmod g=u /stackable/nifi-2.2.0
128128
EOF
129129

@@ -137,16 +137,12 @@ EOF
137137
# Check that permissions and ownership in /stackable are set correctly
138138
# This will fail and stop the build if any mismatches are found.
139139
RUN <<EOF
140-
chmod +x /tmp/check-permissions-ownership
141140
/tmp/check-permissions-ownership /stackable ${STACKABLE_USER_UID} 0
142141
rm /tmp/check-permissions-ownership
143142
EOF
144143

145144
# ----------------------------------------
146-
# Attention:
147-
# If you do any file based actions (copying / creating etc.) below this comment you
148-
# absolutely need to make sure that the correct permissions are applied!
149-
# chown ${STACKABLE_USER_UID}:0
145+
# Attention: Do not perform any file based actions (copying/creating etc.) below this comment because the permissions would not be checked.
150146
# ----------------------------------------
151147

152148
USER ${STACKABLE_USER_UID}

shared/checks/check-permissions-ownership

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ if [[ $# -ne 3 ]]; then
1919
echo "Wrong number of parameters supplied. Usage:"
2020
echo "$0 <directory> <uid> <gid>"
2121
echo "$0 /stackable 1000 0"
22+
exit 1
2223
fi
2324

2425
DIRECTORY=$1

0 commit comments

Comments
 (0)