benrubson commented on a change in pull request #469: GUACAMOLE-890: Security:
Allow image to run as non-root user
URL: https://github.com/apache/guacamole-client/pull/469#discussion_r372912369
##########
File path: guacamole-docker/bin/start.sh
##########
@@ -583,8 +583,11 @@ END
start_guacamole() {
# Install webapp
- rm -Rf /usr/local/tomcat/webapps/${WEBAPP_CONTEXT:-guacamole}
- ln -sf /opt/guacamole/guacamole.war
/usr/local/tomcat/webapps/${WEBAPP_CONTEXT:-guacamole}.war
+ if [ -n "$WEBAPP_CONTEXT" ]
+ then
+ rm /usr/local/tomcat/webapps/guacamole.war
+ ln -sf /opt/guacamole/guacamole.war
/usr/local/tomcat/webapps/${WEBAPP_CONTEXT}.war
+ fi
Review comment:
We can't do both, at least I did not find a way to do so.
We could `chmod 777 webapps` directory at build time, but sounds like a
security breach to me...
IMO there's no way to support `WEBAPP_CONTEXT` as non-root user...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services