You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "loserwang1024 (via GitHub)" <gi...@apache.org> on 2025/10/23 06:25:01 UTC
[I] Fluss docker run with Root User [fluss]
loserwang1024 opened a new issue, #1854:
URL: https://github.com/apache/fluss/issues/1854
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/fluss/issues) and found nothing similar.
### Fluss version
0.7.0 (latest release)
### Please describe the bug 🐞
Currently, though we set the chown right of /opt/fluss as user root.
```yaml
COPY --chown=fluss:fluss build-target/ /opt/fluss/
RUN ["chown", "-R", "fluss:fluss", "."]
COPY docker-entrypoint.sh /
```
However, coordinator and tablet server still run with root user. Besides, the chown right of /tmp/fluss is also root. (It's is easy to see when we enter the docker)
<img width="3152" height="400" alt="Image" src="https://github.com/user-attachments/assets/1383e4b9-dbf7-4e2c-9f59-e48d2084bc0f" />
### Solution
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
--
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: issues-unsubscribe@fluss.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "qiuyunbuyu (via GitHub)" <gi...@apache.org>.
qiuyunbuyu commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3521421187
> [@qiuyunbuyu](https://github.com/qiuyunbuyu) , just do it.
hi @loserwang1024 While testing the process launch with gosu, I encountered an issue I'd like to discuss with you regarding the solution.
When using a Docker volume mount, it automatically creates directories inside the container owned by the **root user and group**. Consequently, when the process is later started under the **fluss user**, it fails to create the storage directories because it lacks write permissions.
<img width="2350" height="228" alt="Image" src="https://github.com/user-attachments/assets/fe1d9c6a-86b6-4a6b-8658-346373346f45" />
Would it be a viable solution to parse the **--env FLUSS_PROPERTIES** environment variable (https://fluss.apache.org/docs/install-deploy/deploying-with-docker/) to extract the values for **data.dir** and **remote.data.dir**, and then pre-create these storage directories in the docker-entrypoint.sh script with appropriate ownership/permissions?
The part I'm unsure about is the key-value parsing in shell—it seems error-prone. I'm wondering if you have a more robust solution in mind? I look forward to your reply.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3693026413
@loserwang1024 sounds good to me
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3689593176
we can mounted data.dir and remote.data.dir into fluss dir by default. Or we can read from a FLUSS_PROPERTIES and then chown it. @wuchong @leonardBang , WDYT?
```shell
# Change the owner of fluss directory after container start to make sure mounted files are accessible.
chown -R fluss:fluss . || echo "Warning: Failed to change ownership"
# Switch to fluss user to execute subsequent commands
exec gosu fluss:fluss bash -c "$@"
```
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3449353617
@qiuyunbuyu Yes, it exactly what I want to.(we should add all the elevant directories and files's permission in docker-entrypoint.sh and then use gosu .
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3510045230
@qiuyunbuyu , just do it.
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "qiuyunbuyu (via GitHub)" <gi...@apache.org>.
qiuyunbuyu commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3471176727
Hi @loserwang1024, Glad we're on the same page! If no one has started working on this, please assign it to me. If someone is already on it, I wish them a smooth implementation. Thanks!
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "loserwang1024 (via GitHub)" <gi...@apache.org>.
loserwang1024 commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3435362491
@wuchong ,CC
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Fluss docker run with Root User [fluss]
Posted by "qiuyunbuyu (via GitHub)" <gi...@apache.org>.
qiuyunbuyu commented on issue #1854:
URL: https://github.com/apache/fluss/issues/1854#issuecomment-3435934811
Hi @loserwang1024 I'm wondering if we should use "**gosu fluss**" to start the relevant processes in **docker-entrypoint.sh**? At the same time, we need to add "**gosu**" to the **Dockerfile**
--
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: issues-unsubscribe@fluss.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org