From 590dde8206042d3b4ecbddf9eba2fa3d5d4db8c5 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 20 Mar 2020 15:21:16 +0100 Subject: [PATCH] Tweak Tomcat permissions --- apk/spoc | 2 +- lxc-shared/alpine3.11-tomcat7/image | 3 ++- lxc-shared/alpine3.11-tomcat8.5/image | 8 ++------ 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/apk/spoc b/apk/spoc index 44c1a86..d4bbce2 160000 --- a/apk/spoc +++ b/apk/spoc @@ -1 +1 @@ -Subproject commit 44c1a8638d651a55e558ca9d97cd2222a367eeac +Subproject commit d4bbce2dcf5ae73bfa22e6ce3a9c09b507857fb4 diff --git a/lxc-shared/alpine3.11-tomcat7/image b/lxc-shared/alpine3.11-tomcat7/image index f2168c5..71376b1 100644 --- a/lxc-shared/alpine3.11-tomcat7/image +++ b/lxc-shared/alpine3.11-tomcat7/image @@ -21,7 +21,8 @@ RUN EOF # Create OS user addgroup -S -g 8080 tomcat adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g tomcat -G tomcat tomcat - chown -R tomcat:tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work + chgrp -R tomcat /srv/tomcat + chown -R tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work EOF CMD /usr/bin/catalina.sh run diff --git a/lxc-shared/alpine3.11-tomcat8.5/image b/lxc-shared/alpine3.11-tomcat8.5/image index ccda668..d1af5f1 100644 --- a/lxc-shared/alpine3.11-tomcat8.5/image +++ b/lxc-shared/alpine3.11-tomcat8.5/image @@ -13,11 +13,6 @@ RUN EOF rm -f /srv/tomcat/bin/tomcat-native.tar.gz rm -f /srv/tomcat/temp/safeToDelete.tmp rm -rf /srv/tomcat/webapps/* - - # Change permissions - find /srv/tomcat -type d -exec chmod 755 {} + - find /srv/tomcat -type f -not -path '/srv/tomcat/conf/*' -exec chmod 644 {} + - chmod 755 /srv/tomcat/bin/*.sh EOF COPY image.d @@ -26,7 +21,8 @@ RUN EOF # Create OS user addgroup -S -g 8080 tomcat adduser -S -u 8080 -h /srv/tomcat -s /bin/false -g tomcat -G tomcat tomcat - chown -R tomcat:tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work + chgrp -R tomcat /srv/tomcat + chown -R tomcat /srv/tomcat/conf /srv/tomcat/logs /srv/tomcat/temp /srv/tomcat/webapps /srv/tomcat/work EOF CMD /usr/bin/catalina.sh run