[Zope] zope access to external files

Dylan Reinhardt Dylan@DylanReinhardt.com
Tue, 04 Mar 2003 10:25:42 -0800


At 09:29 AM 3/4/2003, Ricardo Anguiano wrote:
>        1. I want to restrict file access by user.
>
>         2. I want to serve objects from zope to accomplish objective
>            #1 above, but I want the objects to be in the filesystem.

You can do that with Zope, but reading between the lines a bit, these sound 
like static files you're serving.  If so, I'd recommend putting Apache in 
front of Zope and letting Apache handle it with a RewriteRule like:

RewriteRule ^/files/(.*) /home/httpd/mysite/files/$1 [L]

It doesn't get much easier than that.  ;-)

Zope should (IMO) be used primarily for serving dynamic content.  It's 
fantastic at what is does well, but it just doesn't hold a candle to Apache 
for serving static content... nor should it.  They're two very different tasks.

>           I want to be able to say, "The contents of directory X are
>            available only to user Y."

This isn't a great idea, for the most part.  If you're looking for more 
than trivial security, I wouldn't volunteer information like that.

>http://www.codesourcery.com

Cool domain name. :-)

Dylan