From 637576cee83ba945355f7711ed6a7408a7fb2d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek=20=28YCNet=29?= Date: Sun, 28 Oct 2018 16:04:51 +0100 Subject: [PATCH] Permissions everywhere! --- Dockerfile | 2 +- dockerbin/cron-command | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7279a5d..f6bc99a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ VOLUME /data RUN apk add --no-cache git bash openssh parallel openssh-keygen vim shadow RUN useradd --uid 10000 -ms /bin/bash executor RUN chown executor:executor /data -RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/executor +RUN echo "* * * * * /usr/local/bin/cron-command" >> /etc/crontabs/root RUN touch /var/run/cloner.pid RUN chown executor:executor /var/run/cloner.pid RUN apk del shadow diff --git a/dockerbin/cron-command b/dockerbin/cron-command index 6a7ca18..fe32f63 100755 --- a/dockerbin/cron-command +++ b/dockerbin/cron-command @@ -12,6 +12,7 @@ fi if [ $UID -eq 0 ] then find /data \! -user executor -exec chown executor:executor {} \; + chown executor:executor /var/run/cloner.pid su executor -c cron-command exit $? fi