diff --git a/Dockerfile b/Dockerfile index 029bf8b..922b1b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,6 +46,12 @@ RUN wget -O $RLFILE http://repository.rainloop.net/v2/webmail/$RLFILE && \ USER root COPY rainloop.conf /etc/nginx/conf.d/rainloop.conf COPY nginx.conf /etc/nginx/nginx.conf + +# Set correct permissions and ownership +RUN find $DATA -xdev -type d -exec chmod u=rwx,g=rx,o= '{}' \; && \ + find $DATA -xdev -type f -exec chmod u=rw,g=r,o= '{}' \; && \ + chown -Rh $USER:nginx /opt/rainloop + CMD /bin/sh -c "find /var/lib/nginx/tmp > /dev/null; \ su -s /bin/sh $USER -c php-fpm && \ su -s /bin/sh nginx -c nginx"