protoc-gen-doc icon indicating copy to clipboard operation
protoc-gen-doc copied to clipboard

/usr/local/bin/protoc not others-executable

Open commonquail opened this issue 6 years ago • 1 comments

/usr/local/bin/protoc doesn't have the others exec bit set:

root@4b538eeb5779:/# ls -l /usr/local/bin/protoc*
-rwxr-x--- 1 root staff 4433736 Dec 21  2017 /usr/local/bin/protoc
-rwxrwxr-x 1 root root  3360640 Mar 13  2018 /usr/local/bin/protoc-gen-doc

This means you can't execute docker run with a user, which means the documentation owner becomes root:

$ docker run -u 1000: --rm -v $(pwd)/out:/out -v $(pwd)/protos:/protos:ro -v $(pwd)/google:/google:ro pseudomuto/protoc-gen-doc --proto_path=.
/entrypoint.sh: line 9: /usr/local/bin/protoc: Permission denied

commonquail avatar Feb 15 '19 10:02 commonquail

Seems to be fixed now.

$ docker run -it --rm --entrypoint sh pseudomuto/protoc-gen-doc:1.5.1 -c 'ls -l /usr/bin/protoc*'
-rwxr-xr-x    1 root     root         18568 Oct 18  2021 /usr/bin/protoc
-rwxr-xr-x    1 root     root       8028160 Feb 18  2022 /usr/bin/protoc-gen-doc

xzfc avatar May 31 '24 00:05 xzfc