Please forgive any misuse of terminology here.  I am a sysadmin involved in 
devops deployments of tomcat servers and applications, but I don't really know 
much about how tomcat actually works.  I am a unix guy!

We recently had a deployment of a third party application that resulted in 
tomcat throwing 404 errors on any content of a symlinked directory that was 
contained in/under an aliased path.  It seems to me that it is something in the 
app configuration gone awry, but the vendor claims not.  So I am casting about 
for some information here after not coming up with anything definitive in the 
docs or by act of google.

Example:

1) The context.xml for the root context has the following:

aliases="/static=/pnas/legacy/static"

2) /pnas/legacy/static/ has a symlinked directory that functions as expected at 
the o/s level:

[root@exampleserver]# ls -lad /pnas/legacy/static/Digital
lrwxrwxrwx. 1 appsrv apps 34 Jul 17 21:40 /pnas/legacy/static/Digital -> 
/pnas/editorial/Digital/

3) tomcat runs as the appsrv user and all files in /pnas/editorial/Digital/ are 
owned by appsrv:apps, so we would expect <webroot>/static/Digital/* to be 
accessible without error

4) attempts to access files in <webroot>/static/Digital result in a 404 error 
... but this was not the case before this last app deploy

5) reverting the build of the app is not possible as it was one part of a 
really big multiheaded deployment.  We can work around the issue but accrue 
signifcant technical debt as a result.

6) Versions of anything relevant other than the app itself have not changed:
     tomcat = 7.0.56
     java = 1.7.0_71
     o/s = Red Hat Enterprise Linux Server release 6.8 (Santiago) 
2.6.32-642.11.1.el6.x86_64

Question:

Does the use of symlinks under aliases require some like an "allowLinking" 
attribute or something else that could have misconfigured in the app?

The docs don't really address this case and I can only find reference to 
"allowLinking" affecting material symlinked directlly in or under the web 
context root.   Aliases appear to be suggested as an alternative and symlinks 
under an alias are not specifically addressed (that I have seen).

Any thoughts are appreciated and please do pardon any tomcat vocabulary that I 
may have injured in this effort to pose a question.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to