-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rpk should preserve config file ownership: #4046
Comments
Hello I wanted to contribute to this but I am not sure if I am getting the scenario right
When I try to run
or the permission denied error exactly same with yours
both of which indicate more or less the same thing. A good first step may be to wrap this error and give a more helpful feedback to the user. |
Possibly related to #1919 |
Hi, got this same error today. May I know how to solve this issue? |
@rick20, a few questions:
|
Hi @twmb
v22.1.3
Owner of the dir volume is a non-root user with 775 or 777 permission
I don't manage the redpanda.yaml
redpanda |
Can you upgrade to the latest rpk / redpanda? I don't think the fix was backported to v22.1, which is ~1yr old now. |
Hi @twmb I have tested using latest redpanda. version: '3.7'
services:
redpanda:
# NOTE: Use the latest version here!
image: docker.redpanda.com/vectorized/redpanda:latest
container_name: redpanda-1
command:
- redpanda
- start
- --smp
- '1'
- --reserve-memory
- 0M
- --overprovisioned
- --set redpanda.empty_seed_starts_cluster=false
- --seeds "redpanda-1:33145"
- --kafka-addr
- PLAINTEXT://0.0.0.0:29092,OUTSIDE://0.0.0.0:9092
- --advertise-kafka-addr
- PLAINTEXT://redpanda:29092,OUTSIDE://localhost:9092
- --pandaproxy-addr
- PLAINTEXT://0.0.0.0:28082,OUTSIDE://0.0.0.0:8082
- --advertise-pandaproxy-addr
- PLAINTEXT://redpanda:28082,OUTSIDE://localhost:8082
- --advertise-rpc-addr redpanda-1:33145
ports:
- 8081:8081
- 8082:8082
- 9092:9092
- 28082:28082
- 29092:29092
volumes:
- /data/kafka-data:/var/lib/redpanda/data The host directory: $:~/redpanda$ ls -al /data/
total 12
drwxrwxr-x 3 root root 4096 Jan 15 05:06 .
drwxr-xr-x 20 root root 4096 Jan 15 05:06 ..
drwxrwxr-x 2 root root 4096 Jan 15 05:06 kafka-data I have tested using non-root user as well but still no luck.
|
fixed by changing the ownership of the directory to |
@rick20 The problem is that the default UID:GID of the I followed your example without binding the data directory and it worked:
So that's why you have to change the ownership of the root-owned directory. If I try binding a root-owned directory I get the same error:
I hope this clarify a little bit. |
Just for anyone stuck on this- I was getting:
and I got past it by setting up
particularly, I'm using Kompose, so that means I ended up doing this in my docker-compose file:
|
Version & Environment
Redpanda version: latest
What went wrong?
Failure starting redpanda with an error similar to:
This has been reported multiple times, typically when rpk is run as one user (e.g. sudo) and redpanda is run as another.
What should have happened instead?
If a user does
sudo rpk
command that may backup / rewrite / rename configuration files, rpk should probably propagate the original ownership and permissions of the file (modulo a sanity mask).The text was updated successfully, but these errors were encountered: