internetworkers AT lists.ibiblio.org
Subject: Internetworkers: http://www.ibiblio.org/internetworkers/
List archive
- From: Jim Allman <jim AT ibang.com>
- To: "Internetworkers: http://www.ibiblio.org/internetworkers/" <internetworkers AT lists.ibiblio.org>
- Subject: Re: [internetworkers] Directory Architecture Help
- Date: Sat, 26 Feb 2005 10:32:05 -0500
On Feb 26, 2005, at 12:12 AM, Alan MacHett wrote:
This is the idea I had:...
mysite.com containing /public, /private, and /actualfiles. /actualfiles
would contain the largesse of the files, and /public and /private would be
sorts of mirrors, containing symlinks to the respective files in
/actualfiles.
I could be missing something obvious here.... Any thoughts?
Short answers first:
While I like the notion of symlinks to manage privacy, wouldn't this scheme become very ungainly if you ever need to wrangle more than just a single "in group" versus "everyone else"?
Watch out for intermediaries (caching servers, etc) that might "remember" when a given page was public. But this is a problem with any scheme, unless you get really aggressive with no-cache headers.
. . . . More thoughts, if you're interested . . . .
OK, so your URLs are always expressed in terms of 'mysite.com/private/path/to/file'. This implies that /actualfiles is completely outside of the web space, so the webserver can't see this directory at all, except through a symlink. Makes sense, though I think it might be a drag (for the author) to have the URL keep changing as a page goes from private to public, and vice versa. (Can I edit my public files?)
Since you mentioned user subdirectories, your directory tree would actually look like this, with "parallel universes" of user folders:
/private
/curly
/larry
/schticks
/patter
/jokes
/moe
/public
/curly
/larry
/schticks
/patter
/jokes
/moe
This complicates things considerably, I think. Alternately, you could use a single directory tree (this time with actual files) and use Apache's URL-rewriting to guard anything in a 'PRIVATE' directory (perhaps non-authenticated users are bounced to a login page):
/site-root
/curly
/PRIVATE
/larry
/schticks
/patter
/PRIVATE
/jokes
/moe
/PRIVATE
This could probably be generalized so that it's transparent to authors--we omit the /PRIVATE in URLs, and tell Apache to search the obvious directory, then any PRIVATE subdirectory *only* if the user is authenticated. In this case, return the private item if found. When the author (through whatever UI) toggles a file as public or private, you move the file (no more symlinks) into, or out of, the PRIVATE directory.
For what it's worth, you might also consider a simple CMS with access-control lists, workflow, and multiple document states. This might be overkill, but some of them are pretty easy to get up and rolling. Plone in particular is worth a look, IMO.
Hope this helps,
=jimA=
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Jim Allman
Interrobang Digital Media
http://www.ibang.com/
(919) 649-5760
-
[internetworkers] Directory Architecture Help,
Alan MacHett, 02/26/2005
- Re: [internetworkers] Directory Architecture Help, Jim Allman, 02/26/2005
Archive powered by MHonArc 2.6.24.