roryqi commented on code in PR #11659:
URL: https://github.com/apache/gravitino/pull/11659#discussion_r3417754884


##########
dev/docker/lance-rest-server/Dockerfile:
##########
@@ -27,7 +27,8 @@ WORKDIR /opt/gravitino-lance-rest-server
 
 COPY --chmod=775 packages/gravitino-lance-rest-server 
/opt/gravitino-lance-rest-server
 
-RUN chmod +x /opt/gravitino-lance-rest-server/bin/start-lance-rest-server.sh
+RUN chmod 775 /opt/gravitino-lance-rest-server \
+    && chmod +x /opt/gravitino-lance-rest-server/bin/start-lance-rest-server.sh

Review Comment:
   Thanks for the review. I tested this scenario and the issue doesn't actually 
reproduce on this image. A bare numeric `USER 1000` with no matching 
`/etc/passwd` entry defaults the primary gid to 0 (per OCI runtime behavior), 
so the directory is already group-writable.
   
   Built the equivalent image (`USER 1000`, no `useradd`) and ran it:
   
   ```
   $ id
   uid=1000 gid=0(root) groups=0(root)
   $ ls -ld /opt/test
   drwxrwxr-x 1 root root /opt/test
   $ mkdir /opt/test/logs && echo OK
   OK
   ```
   
   The gid is already 0, so the `chmod 775` makes the log directory writable. 
`useradd -u 1000 -g 0` would not change this behavior — it only adds a passwd 
entry for username resolution, and it does not guard against a runtime `--user 
1000:1000` override either. So I will keep the lance Dockerfile as-is.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to