Skip to content

TIKA-4703: Fix chmod failure in tika-grpc Dockerfile on CI - #2782

Merged
nddipiazza merged 1 commit into
mainfrom
TIKA-4703-fix-grpc-dockerfile-chmod
Apr 23, 2026
Merged

TIKA-4703: Fix chmod failure in tika-grpc Dockerfile on CI#2782
nddipiazza merged 1 commit into
mainfrom
TIKA-4703-fix-grpc-dockerfile-chmod

Conversation

@nddipiazza

Copy link
Copy Markdown
Contributor

Summary

The chmod +x on start-tika-grpc.sh was placed after the USER $UID_GID directive, causing it to run as the non-root user — which cannot change permissions on a root-owned file. This silently passed locally (the file already had the execute bit on the dev filesystem) but failed in CI where the build context is clean.

Root Cause

USER $UID_GID          # switch to non-root
...
RUN chmod +x "/tika/bin/start-tika-grpc.sh"  # ❌ non-root can't chmod root-owned file

Fix

Move the chmod to before the USER switch so it runs as root:

RUN chmod +x "/tika/bin/start-tika-grpc.sh"  # ✅ runs as root
USER $UID_GID

Critical Files

  • tika-grpc/docker-build/Dockerfile

The chmod was running after USER $UID_GID, so it ran as the non-root user
and could not change permissions on the root-owned file copied from the
build context. This worked locally because the file already had the execute
bit set on the host filesystem, but CI builds start with a clean context
where the bit is absent.

Move chmod to before the USER switch so it runs as root.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@nddipiazza
nddipiazza merged commit 4a43c2c into main Apr 23, 2026
4 checks passed
@tballison
tballison deleted the TIKA-4703-fix-grpc-dockerfile-chmod branch September 3, 2026 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant