Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revisar ownership de directorios tomcat #1

Open
arieljlira opened this issue Apr 4, 2017 · 1 comment
Open

Revisar ownership de directorios tomcat #1

arieljlira opened this issue Apr 4, 2017 · 1 comment

Comments

@arieljlira
Copy link
Member

Por default (https://github.com/docker-library/tomcat/blob/master/8.0/jre8/Dockerfile) tomcat está ejecutando como root, lo cual es desaconsejado por tomcat (https://tomcat.apache.org/tomcat-8.0-doc/security-howto.html#Non-Tomcat_settings)
En el https://github.com/iammyr/docs/blob/3e99a347971cfa337a1a175bf24ad792342b86be/tomcat/content.md#hardening-tomcat-security se muestra cómo asegurar la instalación de tomcat de acuerdo a las recomendaciones de tomcat.
Mas info:

@arieljlira
Copy link
Member Author

Sería algo así

RUN umask 007
RUN rm -rf $CATALINA_HOME/webapps/* && \
  chown -R root:tomcat8 $CATALINA_HOME && chmod -R 640 $CATALINA_HOME && chmod -R ug+X $CATALINA_HOME && \
  chown -R tomcat8:tomcat8 $CATALINA_HOME/logs $CATALINA_HOME/work $CATALINA_HOME/temp && \
  chmod -R g+rw $CATALINA_HOME/webapps/ && chmod ug+x $CATALINA_HOME/bin/catalina.sh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant