mukesh154 opened a new issue, #22440: URL: https://github.com/apache/pulsar/issues/22440
### Search before asking - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar. ### Read release policy - [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker. ### Version 3.2.2 ### Minimal reproduce step **Describe the bug** - Run below command to start pulsar into docker container: ``` $ docker run -it \ -p 6650:6650 \ -p 8080:8080 \ --mount source=pulsardata,target=/pulsar/data \ --mount source=pulsarconf,target=/pulsar/conf \ apachepulsar/pulsar:3.2.2 \ bin/pulsar standalone ``` - The pulsar standalone service should start successfully. - exec into the docker container with default user `pulsar` `docker exec -it <container-id> /bin/sh` - Try to start the pulsar-shell with `./bin/pulsar-shell`. - It should throw below exception: ``` $ ./bin/pulsar-shell Exception in thread "main" java.nio.file.AccessDeniedException: /home/pulsar at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397) at java.base/java.nio.file.Files.createDirectory(Files.java:700) at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807) at java.base/java.nio.file.Files.createDirectories(Files.java:793) at org.apache.pulsar.shell.PulsarShell.<init>(PulsarShell.java:160) at org.apache.pulsar.shell.PulsarShell.<init>(PulsarShell.java:142) at org.apache.pulsar.shell.PulsarShell.main(PulsarShell.java:215) ``` - Also, if we do exec into the container with root user `docker exec -it -u root <container-id> /bin/sh`, the `pulsar-shell` is working. - The problem is: `bin` directory is owned by `root` user not the default `pulsar` user. ### What did you expect to see? With default `pulsar` user, the `pulsar-shell` should be opened. ### What did you see instead? - It is throwing below exception: ``` $ ./bin/pulsar-shell Exception in thread "main" java.nio.file.AccessDeniedException: /home/pulsar at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) at java.base/sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:397) at java.base/java.nio.file.Files.createDirectory(Files.java:700) at java.base/java.nio.file.Files.createAndCheckIsDirectory(Files.java:807) at java.base/java.nio.file.Files.createDirectories(Files.java:793) at org.apache.pulsar.shell.PulsarShell.<init>(PulsarShell.java:160) at org.apache.pulsar.shell.PulsarShell.<init>(PulsarShell.java:142) at org.apache.pulsar.shell.PulsarShell.main(PulsarShell.java:215) ``` ### Anything else? The issue is also reproducible on kubernetes environment. ### Are you willing to submit a PR? - [X] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
