SetPath permission denied
Pxe2k opened this issue · 1 comments
Pxe2k commented
I have this Dockerfile
FROM debian:buster-slim as prod
RUN set -x && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
ca-certificates \
# start deps needed for wkhtmltopdf
curl \
libxrender1 \
libjpeg62-turbo \
fontconfig \
libxtst6 \
xfonts-75dpi \
xfonts-base \
xz-utils && \
# stop deps needed for wkhtmltopdf
rm -rf /var/lib/apt/lists/*
RUN curl "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb" -L -o "wkhtmltopdf.deb"
RUN dpkg -i wkhtmltopdf.deb
ENTRYPOINT ["wkhtmltopdf", "/bin/bash"]
RUN chmod -R 777 /usr/local/bin
and when I run my project, at the moment with SetPath I get the error fork/exec /usr/local/bin: permission denied. How can I fix this?
SebastiaanKlippert commented
What do you mean by "at the moment with SetPath"? SetPath does not return an error, it just writes to memory.
You might be getting the error when creating the PDF, at that point you would need access rights to run wkhtmltopdf and the location set by SetPath.
So my suggestion is to further inspect the container to make sure everything is where you expect it to be, the error is saying you don't have rights to access /usr/local/bin, so that will not have a lot to do with my code.