Mailing List Archive

Thoughts on userdir
Hi folks...

Ignore this message if you're not interested in post-1.0 feature stuff.
Me, I'm hoping we can get there as soon as possible, but anyhow.

In the last month, at least two patches to mod_userdir.c have been
forwarded to this list from c.i.w.s.u or apache_bugs that add the
functionality of allowing a full path to be specified in the UserDir
directive, and using that as a base for the file, instead of the user's
shell in the passwd file. In fact, when I first joined this list however
long ago, I presented such a patch. As I recall, rst mentioned that at
his location somewhere, they used a similar system, but where there was
additional path information after the user id, and reccomended that a
userdir module be written that could do this as well. It's a good
idea, but no one ever did.

So I am. I've rewritten mod_userdir.c, for possible inclusion as a
post-1.0 feature addition. But what I'm writing this letter for is to
inquire as to whether there are any additional possibile additions that
would be handy. Namely, currently my mod_userdir can do the following
things:

with: UserDir www (current behavior)
GET /~bob/foo.html -> ~bob/www/foo.html

with: UserDir /usr/local/www
GET /~bob/foo.html -> /usr/local/www/bob/foo.html

with: UserDir /home/%/www
GET /~bob/foo.html -> /home/bob/www/foo.html

And I'm asking... what else should it do? Anyone have any ideas?
Thanks very much.

--/ Alexei Kosut <akosut@nueva.pvt.k12.ca.us> /--------/ Lefler on IRC
----------------------------/ <http://www.nueva.pvt.k12.ca.us/~akosut/>
The viewpoints expressed above are entirely false, and in no way
represent Alexei Kosut nor any other person or entity. /--------------
Re: Thoughts on userdir [ In reply to ]
>
> with: UserDir www (current behavior)
> GET /~bob/foo.html -> ~bob/www/foo.html
>
> with: UserDir /usr/local/www
> GET /~bob/foo.html -> /usr/local/www/bob/foo.html
>
> with: UserDir /home/%/www
> GET /~bob/foo.html -> /home/bob/www/foo.html

I think you should have two different UserDir directives
rather than this potentially confusing setup. My proposal:

UserDir www

GET /~bob/foo.html -> ~bob/www/foo.html

UserPath /usr/local/www/%s

GET /~bob/foo.html -> /usr/local/www/bob/foo.html

UserPath /home/%s/www

GET /~bob/foo.html -> /home/bob/www/foo.html

As you can see, the behavior of the two UserPath directives
above are identical, from a code point of view.

--
sameer Voice: 510-601-9777
Community ConneXion FAX: 510-601-9734
The Internet Privacy Provider Dialin: 510-658-6376
http://www.c2.org/ (or login as "guest") sameer@c2.org
Re: Thoughts on userdir [ In reply to ]
On Sun, 19 Nov 1995, sameer wrote:

> I think you should have two different UserDir directives
> rather than this potentially confusing setup. My proposal:

I don't think it's confusing. I think using the same directive for them
all makes a lot of sense.

> UserPath /usr/local/www/%s

Now wait a minute... this isn't printf. In my email I said "%" and I mean
"%". I see no reason for the s.

> As you can see, the behavior of the two UserPath directives
> above are identical, from a code point of view.

Yes, but there is a question of idiot-proofing, and just in general
making things simple for the end user. It's a very little extra bit of
code to use, and many people *will* type in

UserDir /usr/local/www

and expect it to work as I've outlined.

--/ Alexei Kosut <akosut@nueva.pvt.k12.ca.us> /--------/ Lefler on IRC
----------------------------/ <http://www.nueva.pvt.k12.ca.us/~akosut/>
The viewpoints expressed above are entirely false, and in no way
represent Alexei Kosut nor any other person or entity. /--------------
Re: Thoughts on userdir [ In reply to ]
From the tone of your note it seems that you have gotten the
impression that I was attacking your idea. I'm not. I'm just offering
my input and suggestions. I said "potentially confusing", not
"confusing".

> I don't think it's confusing. I think using the same directive for them
> all makes a lot of sense.
>
> > UserPath /usr/local/www/%s
>
> Now wait a minute... this isn't printf. In my email I said "%" and I mean
> "%". I see no reason for the s.

Right, it's not printf. Perhaps %s isn't a good idea.. but a
plain % isn't very standard. some sort of thing similar to the
%{content-type}o stuff that is used in the LogFormat directive would
perhaps be useful. Settling on a standard for this sort of stuff and
being consistent is a good idea. A plain '%' isn't standard.

> Yes, but there is a question of idiot-proofing, and just in general
> making things simple for the end user. It's a very little extra bit of
> code to use, and many people *will* type in
>
> UserDir /usr/local/www
>
> and expect it to work as I've outlined.


good point.

--
sameer Voice: 510-601-9777
Community ConneXion FAX: 510-601-9734
The Internet Privacy Provider Dialin: 510-658-6376
http://www.c2.org/ (or login as "guest") sameer@c2.org
Re: Thoughts on userdir [ In reply to ]
>
> From the tone of your note it seems that you have gotten the
> impression that I was attacking your idea. I'm not. I'm just offering
> my input and suggestions. I said "potentially confusing", not
> "confusing".
>
> > I don't think it's confusing. I think using the same directive for them
> > all makes a lot of sense.
> >
> > > UserPath /usr/local/www/%s
> >
> > Now wait a minute... this isn't printf. In my email I said "%" and I mean
> > "%". I see no reason for the s.
>
> Right, it's not printf. Perhaps %s isn't a good idea.. but a
> plain % isn't very standard. some sort of thing similar to the
> %{content-type}o stuff that is used in the LogFormat directive would
> perhaps be useful. Settling on a standard for this sort of stuff and
> being consistent is a good idea. A plain '%' isn't standard.

Hmmm ... this also touches on a future aliasing module. I'd like to be able
to alias a/*/b to c/d/*, for instance, or even more general stuff. It would
be good if the notation for UserDir were compatible with the notation for
aliases.

>
> > Yes, but there is a question of idiot-proofing, and just in general
> > making things simple for the end user. It's a very little extra bit of
> > code to use, and many people *will* type in
> >
> > UserDir /usr/local/www
> >
> > and expect it to work as I've outlined.
>
>
> good point.
>
> --
> sameer Voice: 510-601-9777
> Community ConneXion FAX: 510-601-9734
> The Internet Privacy Provider Dialin: 510-658-6376
> http://www.c2.org/ (or login as "guest") sameer@c2.org

--
Ben Laurie Phone: +44 (181) 994 6435
Freelance Consultant Fax: +44 (181) 994 6472
and Technical Director Email: ben@algroup.co.uk
A.L. Digital Ltd, URL: http://www.algroup.co.uk
London, England.
Re: Thoughts on userdir [ In reply to ]
On Mon, 20 Nov 1995, Ben Laurie wrote:

> Hmmm ... this also touches on a future aliasing module. I'd like to be able
> to alias a/*/b to c/d/*, for instance, or even more general stuff. It would
> be good if the notation for UserDir were compatible with the notation for
> aliases.

Good point. Hmm. But * implies wildcard matching, since that's what it's
used for in most of the Unix world, and indeed in your alias example. But
in userdir, it isn't really matching anything, it's replacing it with the
username... I'm not sure * is the right character to use here. So I guess
that's the question. What is the right character... hitting shift and my
number keys, I get !@#$%^&*(). I suppose one of them. Or maybe ~, since
that's usually associated with user's home directories. No, that could
get *really* confusing, now, couldn't it... Hmm.

Any thoughts?

--/ Alexei Kosut <akosut@nueva.pvt.k12.ca.us> /--------/ Lefler on IRC
----------------------------/ <http://www.nueva.pvt.k12.ca.us/~akosut/>
The viewpoints expressed above are entirely false, and in no way
represent Alexei Kosut nor any other person or entity. /--------------
Re: Thoughts on userdir [ In reply to ]
I would suggest useing a/*/b to c/d/& . There is a small
bit of UNIX history here in the fact that in the old days you could
express a password entry like:

foo:xxx:100:100:Foo Bar:/home/&:/bin/csh

and in the sun automounter (and AMD?) where:

* /export/home/&

Where "&" was replaced with the wildcard.


On Tue, 21 Nov 1995, Alexei Kosut wrote:


> On Mon, 20 Nov 1995, Ben Laurie wrote:
>
> > Hmmm ... this also touches on a future aliasing module. I'd like to be able
> > to alias a/*/b to c/d/*, for instance, or even more general stuff. It would
> > be good if the notation for UserDir were compatible with the notation for
> > aliases.
>
> Good point. Hmm. But * implies wildcard matching, since that's what it's
> used for in most of the Unix world, and indeed in your alias example. But
> in userdir, it isn't really matching anything, it's replacing it with the
> username... I'm not sure * is the right character to use here. So I guess
> that's the question. What is the right character... hitting shift and my
> number keys, I get !@#$%^&*(). I suppose one of them. Or maybe ~, since
> that's usually associated with user's home directories. No, that could
> get *really* confusing, now, couldn't it... Hmm.
>
> Any thoughts?
>
> --/ Alexei Kosut <akosut@nueva.pvt.k12.ca.us> /--------/ Lefler on IRC
> ----------------------------/ <http://www.nueva.pvt.k12.ca.us/~akosut/>
> The viewpoints expressed above are entirely false, and in no way
> represent Alexei Kosut nor any other person or entity. /--------------
>
>
>
Re: Thoughts on userdir [ In reply to ]
> On Mon, 20 Nov 1995, Ben Laurie wrote:
>
> > Hmmm ... this also touches on a future aliasing module. I'd like to be able
> > to alias a/*/b to c/d/*, for instance, or even more general stuff. It would
> > be good if the notation for UserDir were compatible with the notation for
> > aliases.
>
> Good point. Hmm. But * implies wildcard matching, since that's what it's
> used for in most of the Unix world, and indeed in your alias example. But
> in userdir, it isn't really matching anything, it's replacing it with the
> username... I'm not sure * is the right character to use here. So I guess
> that's the question. What is the right character... hitting shift and my
> number keys, I get !@#$%^&*(). I suppose one of them. Or maybe ~, since
> that's usually associated with user's home directories. No, that could
> get *really* confusing, now, couldn't it... Hmm.
>
> Any thoughts?
>


I think that * makes perfect sense.