tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Symlinks inside WEB-INF/classes not working for me
Date Tue, 14 Jul 2009 03:18:36 GMT

"Christopher Schultz" <chris@christopherschultz.net> wrote in message 
news:4A5BE03C.7050801@christopherschultz.net...
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> David,
>
> On 7/13/2009 8:50 PM, David Smith wrote:
>> If you look at all the third party repackages of tomcat that fail,
>> you'll see a theme -- symlinks cause problems in java.  I would highly
>> recommend you find a way to maintain that config file via the build
>> system and have a copy in each of the webapps.  Either that or put a
>> copy in tomcat's lib folder where it becomes accessible to all webapps
>> in the environment.
>
> While I agree with your recommendation for using a more sophisticated
> build/deployment process, I disagree with your reasoning. Java and/or
> Tomcat should not have any problem reading files via symlinks. As far as
> I know, Java's I/O API does not have the ability to distinguish between
> symbolic and hard links. I suspect the problem lies elsewhere.
>

My first guess is that there is a SecurityManager lurking somewhere to stop 
the OP from doing:
  ln -s /etc/passwd


> It's possible that the native part of the ClassLoader has some objection
> to symlinked files, but I can't imagine that to be true.
>
> I have never had any problems with symlinks from Java programs in the
> past. That doesn't mean that I've seen everything, though.
>
> John, what is the actual error when the file cannot be found? What
> happens if you try to open the file using a FileInputStream instead of
> the ClassLoader?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkpb4DwACgkQ9CaO5/Lv0PA3MACdERUerLlhWtgnMlI6ruGLor4/
> UHgAn1myPgqBIMbvMoWJylPdi1fdCteQ
> =t8RA
> -----END PGP SIGNATURE----- 




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


Mime
View raw message