Skip to content

Commit

Permalink
Work around mysterious SCC file permissions bug
Browse files Browse the repository at this point in the history
For some reason the SCC in the OpenJ9 image is not
accessible to users in the root group on some systems.

Signed-off-by: Younes Manton <[email protected]>
  • Loading branch information
ymanton committed Oct 1, 2020
1 parent 22c75b5 commit 2ab81b2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions releases/latest/kernel/helpers/build/populate_scc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,14 @@ done
if [[ $EUID -eq 0 ]] && [[ -d /opt/java/.scc ]]
then
chmod g+rwx /opt/java/.scc
# Despite the OpenJ9 SCC being owned by root:root, on some systems the file is still
# not accessible to users in the root group for as-yet unknown reasons.
# The following workaround 'fixes' the problem, even though it appears to be a no-op.
# Note that modifying the file will cause it to be duplicated to this Docker layer,
# which prevents the SCC from being shared by processes running in other containers
# based on the same OpenJ9 image.
# This workaround should be removed if/when the root cause of the problem is found.
chown root:root /opt/java/.scc/*_openj9_system_scc_*
fi

OLD_UMASK=`umask`
Expand Down

0 comments on commit 2ab81b2

Please sign in to comment.