Skip to content

Commit

Permalink
fix permissions into home folder (#201)
Browse files Browse the repository at this point in the history
Fix permissions issue into /home/hugo folder - #200
  • Loading branch information
floryn90 authored Jan 11, 2025
2 parents 9b3d2a6 + 2398b88 commit e78d2fe
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/docker/_imports/default_nonroot_user_alpine.df
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
RUN getent group hugo 2>&1 > /dev/null || addgroup -g 1234 hugo \
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -H -G hugo -g "" hugo
&& getent passwd hugo 2>&1 > /dev/null || adduser -u 1234 -D -h /home/hugo -G hugo -g "" hugo
2 changes: 1 addition & 1 deletion src/docker/alpine-ext/ext-alpine.df
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN true \
#
# Prepare folders
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target \
#
# add /src to safe.directory
Expand Down
2 changes: 1 addition & 1 deletion src/docker/alpine-ext/ext-asciidoctor.df
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ RUN apk -U upgrade && apk --no-cache add asciidoctor \
&& gem install coderay --no-document \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod -R a+rwx /src /target

VOLUME [ "/src", "/target" ]
Expand Down
2 changes: 1 addition & 1 deletion src/docker/alpine/alpine.df
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ IMPORT ../_imports/default_nonroot_user_alpine.df
RUN apk -U upgrade && apk --no-cache add busybox-suid bash bash-completion tzdata make \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+rwx /src /target

VOLUME [ "/src", "/target" ]
Expand Down
2 changes: 1 addition & 1 deletion src/docker/busybox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ COPY --from=image / /
IMPORT ../_imports/default_nonroot_user_alpine.df

RUN mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target

VOLUME [ "/src", "/target" ]
Expand Down
2 changes: 1 addition & 1 deletion src/docker/debian-ext/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ RUN true \
&& rm -rf /var/lib/apt/lists/* \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target \
#
# add /src to safe.directory
Expand Down
2 changes: 1 addition & 1 deletion src/docker/debian/base.df
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apt update \
&& rm -rf /var/lib/apt/lists/* \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target

COPY --from=base--files--debian / /
Expand Down
2 changes: 1 addition & 1 deletion src/docker/ubuntu-ext/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN true \
&& rm -rf /var/lib/apt/lists/* \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target \
#
# add /src to safe.directory
Expand Down
2 changes: 1 addition & 1 deletion src/docker/ubuntu/base.df
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN apt update \
&& rm -rf /var/lib/apt/lists/* \
&& find /tmp -mindepth 1 -maxdepth 1 | xargs rm -rf \
&& mkdir -p /src /target \
&& chown -R hugo:hugo /src /target \
&& chown -R hugo:hugo /src /target /home/hugo \
&& chmod a+wrx /src /target

VOLUME [ "/src", "/target" ]
Expand Down

0 comments on commit e78d2fe

Please sign in to comment.