<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Following symbolic links in Tomcat</title>
	<atom:link href="http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/</link>
	<description>Thoughts and tutorials on web design, Java, Javascript and project management</description>
	<lastBuildDate>Tue, 27 Jul 2010 21:34:24 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Oli</title>
		<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/comment-page-1/#comment-1007</link>
		<dc:creator>Oli</dc:creator>
		<pubDate>Fri, 12 Feb 2010 06:43:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.isocra.com/new/2008/01/following-symbolic-links-in-tomcat/#comment-1007</guid>
		<description>Hi, 

following on from  this, 

have a simple virtual host with a context element inside, simple one line 

symlinks work fine on one level, so my app directory is x, everything is served from x including symlinks to physical directories or files.

however if a symlink under x points to another symlink which then points to a physical directory, i get a resource not found error.
 
this is the same behaviour for all tomcats 5.5 + works fine in tomcat 5.019/28
any ideas would be much appreciated

oli</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>following on from  this, </p>
<p>have a simple virtual host with a context element inside, simple one line </p>
<p>symlinks work fine on one level, so my app directory is x, everything is served from x including symlinks to physical directories or files.</p>
<p>however if a symlink under x points to another symlink which then points to a physical directory, i get a resource not found error.</p>
<p>this is the same behaviour for all tomcats 5.5 + works fine in tomcat 5.019/28<br />
any ideas would be much appreciated</p>
<p>oli</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ningappa</title>
		<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/comment-page-1/#comment-881</link>
		<dc:creator>Ningappa</dc:creator>
		<pubDate>Thu, 20 Aug 2009 07:13:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.isocra.com/new/2008/01/following-symbolic-links-in-tomcat/#comment-881</guid>
		<description>Hi All,

Using  &quot;allowLinking=true&quot; in context.xml of tomcat 6, I am able to access soft links, within the application project directory.
but the problem is when I undeploy  the application by deleting only project.war file, tomcat is deleting all the contents inside the soft links along with that project directory, but for me it&#039;s causing the serious problem by deleting the valuable web content.

Let me know if you have any clue on this.


Thanks
Ningappa</description>
		<content:encoded><![CDATA[<p>Hi All,</p>
<p>Using  &#8220;allowLinking=true&#8221; in context.xml of tomcat 6, I am able to access soft links, within the application project directory.<br />
but the problem is when I undeploy  the application by deleting only project.war file, tomcat is deleting all the contents inside the soft links along with that project directory, but for me it&#8217;s causing the serious problem by deleting the valuable web content.</p>
<p>Let me know if you have any clue on this.</p>
<p>Thanks<br />
Ningappa</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: enrique marmolejo</title>
		<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/comment-page-1/#comment-870</link>
		<dc:creator>enrique marmolejo</dc:creator>
		<pubDate>Tue, 28 Jul 2009 16:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.isocra.com/new/2008/01/following-symbolic-links-in-tomcat/#comment-870</guid>
		<description>thanks a lot, you save my day an a headache.</description>
		<content:encoded><![CDATA[<p>thanks a lot, you save my day an a headache.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neale Rudd</title>
		<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/comment-page-1/#comment-740</link>
		<dc:creator>Neale Rudd</dc:creator>
		<pubDate>Thu, 05 Feb 2009 07:15:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.isocra.com/new/2008/01/following-symbolic-links-in-tomcat/#comment-740</guid>
		<description>Hi,

Just wanted to thank you both for the info on the allowLinking setting.

We run Australia&#039;s largest/oldest java hosting company and have a customer on a dedicated server who write and operate
a CMS.

Usually all their sites run under a single account, but they wanted a way to have a separate account (separate Host entry)
which uses the WEB-INF, META-INF and data folder from their main CMS account.

The purpose was so that their client could log in using FTP and create additional folders of static content.
eg: www.example-domain.com/promo

We found at first that we could symlink META-INF with no problems, but symlinking WEB-INF ended up deploying an
application with no name (which did not correctly start up).  The other alternative was to copy the WEB-INF folder
into the new webapps_someclient/ROOT folder, but this meant that any code updates needed to be deployed to
every Host set up in this way.

After adding the allowLinking flag however, it all works fine.

As an added benefit, the FTP service has not been set to follow symlinks, so their client can now log in, see the
META-INF, WEB-INF and data folder links, but cannot change-directory to them, and therefore cannot download
or edit the application classes.

Also - good advice by DenisH.  This setup is on Linux so does not affect the security.

We recommend the use of context.xml as it&#039;s the most effective way of allowing customers to upload their applications,
either unpacked or in a WAR.  Other alternatives are placing context files in the conf folder, which limits what customers
can do, or in server.xml (yuck).

One recommendation I have however, is to remove path=&quot;/myapp&quot; from your Context tag.  It is unnecessary and may
cause headaches if you relocate the application.  If you leave it out, the path defaults to whatever the application
path is relative to the webapps folder.

eg:
/webapps/ROOT   - the META-INF/context.xml for this app will default to &quot;/&quot;
/webapps/myApp   - the META-INF/context.xml for this app will default to &quot;/myApp&quot;

... so leave the path attribute out, then you can copy myApp to myOtherApp and the application will still work properly
without any modifications to it&#039;s context.xml file.

The context.xml file is also a great place for JNDI DBCP datasource settings, and Tomcat Realms security file/database location
settings.

Regards,
Neale</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Just wanted to thank you both for the info on the allowLinking setting.</p>
<p>We run Australia&#8217;s largest/oldest java hosting company and have a customer on a dedicated server who write and operate<br />
a CMS.</p>
<p>Usually all their sites run under a single account, but they wanted a way to have a separate account (separate Host entry)<br />
which uses the WEB-INF, META-INF and data folder from their main CMS account.</p>
<p>The purpose was so that their client could log in using FTP and create additional folders of static content.<br />
eg: <a href="http://www.example-domain.com/promo" rel="nofollow">http://www.example-domain.com/promo</a></p>
<p>We found at first that we could symlink META-INF with no problems, but symlinking WEB-INF ended up deploying an<br />
application with no name (which did not correctly start up).  The other alternative was to copy the WEB-INF folder<br />
into the new webapps_someclient/ROOT folder, but this meant that any code updates needed to be deployed to<br />
every Host set up in this way.</p>
<p>After adding the allowLinking flag however, it all works fine.</p>
<p>As an added benefit, the FTP service has not been set to follow symlinks, so their client can now log in, see the<br />
META-INF, WEB-INF and data folder links, but cannot change-directory to them, and therefore cannot download<br />
or edit the application classes.</p>
<p>Also &#8211; good advice by DenisH.  This setup is on Linux so does not affect the security.</p>
<p>We recommend the use of context.xml as it&#8217;s the most effective way of allowing customers to upload their applications,<br />
either unpacked or in a WAR.  Other alternatives are placing context files in the conf folder, which limits what customers<br />
can do, or in server.xml (yuck).</p>
<p>One recommendation I have however, is to remove path=&#8221;/myapp&#8221; from your Context tag.  It is unnecessary and may<br />
cause headaches if you relocate the application.  If you leave it out, the path defaults to whatever the application<br />
path is relative to the webapps folder.</p>
<p>eg:<br />
/webapps/ROOT   &#8211; the META-INF/context.xml for this app will default to &#8220;/&#8221;<br />
/webapps/myApp   &#8211; the META-INF/context.xml for this app will default to &#8220;/myApp&#8221;</p>
<p>&#8230; so leave the path attribute out, then you can copy myApp to myOtherApp and the application will still work properly<br />
without any modifications to it&#8217;s context.xml file.</p>
<p>The context.xml file is also a great place for JNDI DBCP datasource settings, and Tomcat Realms security file/database location<br />
settings.</p>
<p>Regards,<br />
Neale</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DenisH</title>
		<link>http://www.isocra.com/2008/01/following-symbolic-links-in-tomcat/comment-page-1/#comment-122</link>
		<dc:creator>DenisH</dc:creator>
		<pubDate>Mon, 31 Mar 2008 09:05:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.isocra.com/new/2008/01/following-symbolic-links-in-tomcat/#comment-122</guid>
		<description>It turns out that there are a few caveats to using &quot;allowLinking&quot;. First the documentation for the &lt;a href=&quot;http://tomcat.apache.org/tomcat-5.5-doc/config/context.html&quot; rel=&quot;nofollow&quot;&gt;context element&lt;/a&gt; for Tomcat 5.5 says: &lt;b&gt;NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.&lt;/b&gt;

And second, in the &lt;a href=&quot;http://tomcat.apache.org/migration.html&quot; rel=&quot;nofollow&quot;&gt;migration documentation&lt;/a&gt; from 5.5 to Tomcat 6, it says &quot;When using a shared webhosting environment, it is recommended that usage of context.xml inside a WAR is forbidden (using the deployXML  attribute of the Host element)&quot;. Presumably this is because it would allow badly behaved configurations to be loaded? 

So, just be aware of these pieces of advice if you are going to use the context.xml and allowLinking.</description>
		<content:encoded><![CDATA[<p>It turns out that there are a few caveats to using &#8220;allowLinking&#8221;. First the documentation for the <a href="http://tomcat.apache.org/tomcat-5.5-doc/config/context.html" rel="nofollow">context element</a> for Tomcat 5.5 says: <b>NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems.</b></p>
<p>And second, in the <a href="http://tomcat.apache.org/migration.html" rel="nofollow">migration documentation</a> from 5.5 to Tomcat 6, it says &#8220;When using a shared webhosting environment, it is recommended that usage of context.xml inside a WAR is forbidden (using the deployXML  attribute of the Host element)&#8221;. Presumably this is because it would allow badly behaved configurations to be loaded? </p>
<p>So, just be aware of these pieces of advice if you are going to use the context.xml and allowLinking.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
