Skip to content

Commit 1a49555

Browse files
committed
Images: Use chown with : instead of ..
1 parent 6bcaca1 commit 1a49555

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

images/nginx/rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ RUN apk update \
6666
); \
6767
for dir in "${writeDirs[@]}"; do \
6868
mkdir -p ${dir}; \
69-
chown -R www-data.www-data ${dir}; \
69+
chown -R www-data:www-data ${dir}; \
7070
done'
7171

7272
EXPOSE 80 443

images/nginx/rootfs/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ adduser -S -D -H -u 101 -h /usr/local/nginx -s /sbin/nologin -G www-data -g www-
624624

625625
for dir in "${writeDirs[@]}"; do
626626
mkdir -p ${dir};
627-
chown -R www-data.www-data ${dir};
627+
chown -R www-data:www-data ${dir};
628628
done
629629

630630
rm -rf /etc/nginx/owasp-modsecurity-crs/.git

rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ RUN bash -xeu -c ' \
5959
); \
6060
for dir in "${writeDirs[@]}"; do \
6161
mkdir -p ${dir}; \
62-
chown -R www-data.www-data ${dir}; \
62+
chown -R www-data:www-data ${dir}; \
6363
done' \
6464
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
6565
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below

rootfs/Dockerfile-chroot

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ RUN bash -xeu -c ' \
7878
); \
7979
for dir in "${writeDirs[@]}"; do \
8080
mkdir -p ${dir}; \
81-
chown -R www-data.www-data ${dir}; \
81+
chown -R www-data:www-data ${dir}; \
8282
done' \
8383
# LD_LIBRARY_PATH does not work so below is needed for opentelemetry/other modules
8484
# Put libs of newer modules under `/modules_mount/<other>/lib` and add that path below
@@ -103,7 +103,7 @@ RUN ln -sf /chroot/etc/nginx /etc/nginx \
103103
&& touch /chroot/var/log/nginx/access.log \
104104
&& chown www-data:www-data /chroot/var/log/nginx/access.log \
105105
&& echo "" > /chroot/etc/resolv.conf \
106-
&& chown -R www-data.www-data /chroot/var/log/nginx /chroot/etc/resolv.conf \
106+
&& chown -R www-data:www-data /chroot/var/log/nginx /chroot/etc/resolv.conf \
107107
&& mknod -m 0666 /chroot/dev/null c 1 3 \
108108
&& mknod -m 0666 /chroot/dev/random c 1 8 \
109109
&& mknod -m 0666 /chroot/dev/urandom c 1 9 \

rootfs/chroot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ writeDirs=( \
3939

4040
for dir in "${writeDirs[@]}"; do
4141
mkdir -p ${dir};
42-
chown -R www-data.www-data ${dir};
42+
chown -R www-data:www-data ${dir};
4343
done
4444

4545
mkdir -p /chroot/lib /chroot/proc /chroot/usr /chroot/bin /chroot/dev /chroot/run

0 commit comments

Comments
 (0)