Subject: RE: The upload command in ftpaccess file

From: [email-masked]
Date: Tue, 07 Mar 1995 15:11:27 -0800 (PST)

>	I seem to be having some difficulty with getting the upload 
>command in the ftpaccess file to work properly.  I have this:
>
>upload  /Second/Users/ftp  *       no
>upload  /Second/Users/ftp  /incoming  yes  root  wheel  0600  nodirs   
>
>	But I can make directories and the file ownership and bits aren't 
>right either.

I had trouble with this when running under Lynx; running under Linux all is well.
What OS are you running?  Others on the list have had trouble, I think, and may have
better insight than I on this.

>
>Also as a side note, I'm using the O'Reilly "Managing Internet 
>Information Services" (which has helped greatly) but I think it might 
>have a typo.  When it gives an example of the path-filter command it sez 
>"path-filter anonymous /path/message ^[-A-Za-z0-9._]*$ ^. ^- "  I think 
>this should have the " ^. " read " ^/. ".

It should be            ^\.

This means that a file that begins with '.' cannot be created.  This prevents someone
from being able to create a .forward or .rhosts or a similar '.' file.  Helps keep someone 
from creating a .forward in the directory and mailing /etc/passwd to themselves...

>____________________________   ____________________________________________
>Ralph Lewis		    \ /	I'm a 21st Century digital boy
>WSU Information Technology  -O-	I don't know how to read, but I got a lot 
>[email-masked]   / \	  toys. 	-Bad Religion

---------------
Michael Brennen                    Intecom, Inc.
[email-masked]               5057 Keller Springs
(214) 447-8074                     Dallas,  TX  75248

---

From: Ralph Lewis <[email-masked]>
Date: Tue, 07 Mar 1995 16:19:20 -0800 (PST)

> better insight than I on this.

	I'm running NeXTSTEP 3.0 on black hardware (non-intel).  Up until 
this point I've have fairly little trouble with wu-ftpd.  Thanx for the 
input...

____________________________   ____________________________________________
Ralph Lewis		    \ /	I'm a 21st Century digital boy
WSU Information Technology  -O-	I don't know how to read, but I got a lot 
[email-masked]   / \	  toys. 	-Bad Religion

---

From: Joshua Krage <[email-masked]>
Date: Wed, 08 Mar 1995 13:18:44 -0500 (EST)

> from creating a .forward in the directory and mailing /etc/passwd to themselves...

The man page for ftpaccess(5) that comes with the wu-ftpd 2.4 
distribution is also in error, as it ommits the forward-slash from its 
example.  The example, as provided in ftpaccess(5), is:
   path-filter anonymous /etc/pathmsg ^[-A-Za-z0-9._]*$ ^. ^-

The example is doc/examples/ftpaccess.heavy has the correct examples:
   path-filter  anonymous  /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
   path-filter  guest      /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-

I would guess O'Reilly read right from the man page...

----------------------------------------------------------------------------
Joshua Krage                                            [email-masked]
Network Administrator          SCIENTECH, Inc.        (301) 468-6425 (Voice)

---

From: Vidiot <[email-masked]>
Date: Wed, 08 Mar 1995 14:56:42 -0600 (CST)

<
<On Tue, 7 Mar 1995 [email-masked] wrote:
<> >Also as a side note, I'm using the O'Reilly "Managing Internet 
<> >Information Services" (which has helped greatly) but I think it might 
<> >have a typo.  When it gives an example of the path-filter command it sez 
<> >"path-filter anonymous /path/message ^[-A-Za-z0-9._]*$ ^. ^- "  I think 
<> >this should have the " ^. " read " ^/. ".
<> 
<> It should be            ^\.
<> 
<> This means that a file that begins with '.' cannot be created.  This prevents someone
<> from being able to create a .forward or .rhosts or a similar '.' file.  Helps keep someone 
<> from creating a .forward in the directory and mailing /etc/passwd to themselves...
<
<The man page for ftpaccess(5) that comes with the wu-ftpd 2.4 
<distribution is also in error, as it ommits the forward-slash from its 
<example.  The example, as provided in ftpaccess(5), is:
<   path-filter anonymous /etc/pathmsg ^[-A-Za-z0-9._]*$ ^. ^-
<
<The example is doc/examples/ftpaccess.heavy has the correct examples:
<   path-filter  anonymous  /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
<   path-filter  guest      /etc/pathmsg  ^[-A-Za-z0-9_\.]*$  ^\.  ^-
<
<I would guess O'Reilly read right from the man page...

Where I come from a \ = backslash and / = forward slash.  I'm assuming you
really meant to say "ommits the backslash from its".

MB
-- 
System Administrator - Extrel FTMS - Madison WI.
e-mail: [email-masked]
phone: (608) 273-8262  fax: (608) 273-8719  voice-mail: (800) 426-6488 ext 6293
Visit - http://www.ftms.com/vidiot/  (Your link to the world of Star Trek)

---

From: Joshua Krage <[email-masked]>
Date: Thu, 09 Mar 1995 09:34:38 -0500 (EST)

On Wed, 8 Mar 1995, Vidiot wrote:
> <[email-masked] wrote:

Yup, I should have said backslash.  I also should have said "...guess 
O'Reilly read _straight_ from the man page..."

Basicly, both O'Reilly and the man page are wrong.

According to my recent foray into regexp patterns:
The expression
   ^\.       (caret backslash dot)    matches a character of '.'
   ^.        (caret dot)              matches any single-character
(all matches at the beginning of the string, since the caret is used)

An ftpaccess file with ^. would end up preventing uploads (since any 
character would be matched).

An ftpaccess file with ^\. would end up preventing uploads with a '.' at 
the front of the filename.

And just to make sure, I tested both path-filters.  Use ^\.
(caret backslash dot) for your path-filter.