Subject: path-filter

From: "Rick Flood" <[email-masked]>
Date: Fri, 6 Nov 1998 08:12:13 -0500

I have a user that needs to be able to upload files with blanks in the file
name.  I have tried playing with the path-filter to make blanks allowed but
can't seem to get it to work?  Any clues would be appreciated.  My current
path-filter is:

path-filter  guest      /etc/pathmsg.orig  ^[-A-Za-z0-9_\.]*$  ^\.  ^-

Rick Flood mailto:[email-masked]
Eastman Kodak, INET Infrastructure
Phone:(716)722-4331   Fax:(716)477-0552

---

From: Michael Brennen <[email-masked]>
Date: Fri, 6 Nov 1998 08:11:48 -0600 (EST)

Untested, but try this:

path-filter  guest /etc/pathmsg.orig  ^[-A-Za-z0-9_\.\ ]*$  ^\. ^-

   -- Michael

---

From: "Rick Flood" <[email-masked]>
Date: Fri, 6 Nov 1998 09:31:22 -0500

I tried that earlier and again just now, doesn't work...
I get a '553 REGEX error' when trying to upload the file.  I ONLY see the
553 error, the pathmsg.orig is not displayed.

> -----Original Message-----
> From: Michael Brennen [mailto:[email-masked]]
> Sent: Friday, November 06, 1998 9:12 AM
> To: Rick Flood
> Cc: [email-masked]
> Subject: Re: path-filter
>
>
>
> Untested, but try this:
>

---

From: Aaron Holtz <[email-masked]>
Date: Fri, 6 Nov 1998 09:36:59 -0500 (EST)

Rick,

	Would this work:

path-filter  guest      /etc/pathmsg.orig  ^[-A-Za-z0-9_\.\s+]*$  ^\.  ^-

The \s+  should allow one or more whitespace characters, no?

--------------------------------------------------------------------------
Aaron Holtz
ComNet Inc.
Manager, Unix Systems Administration
Email:  [email-masked]
"We do these things not because they are easy, 
 but because they are hard."  -JFK
--------------------------------------------------------------------------

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 6 Nov 1998 10:22:12 -0500 (EST)

On Fri, 6 Nov 1998, Rick Flood wrote:

> I tried that earlier and again just now, doesn't work... I get a '553
> REGEX error' when trying to upload the file.  I ONLY see the 553
> error, the pathmsg.orig is not displayed.

> > > path-filter  guest      /etc/pathmsg.orig  ^[-A-Za-z0-9_\.]*$  ^\.  ^-

The core problem is the daemon's method of parsing the configuration file.
you cannot put spaces in there.  So you need a way to escape them.

The VR versions of the daemon allow the use of the POSIX form [:SPACE:] in
regular expressions.  To use it, however, you will need the GNU librx
library (which is included with many Linux distributions but not with most
other Unix systems).

It is possible, depending upon the regular expression library actually
used on your system, that alternate forms may work.  You will need to look
at the documentation for the regular expression library which came with
your system.  If it does not provide an alternate form for specifying
non-print characters in the expression, you will probably need to download
the GNU library, build it for your Unix, and just to VR10.

-- 

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: "Rick Flood" <[email-masked]>
Date: Fri, 6 Nov 1998 10:33:17 -0500

That did not work either...

> From: [email-masked]
> [mailto:[email-masked]]On Behalf Of Aaron Holtz
> Sent: Friday, November 06, 1998 9:37 AM
> To: Rick Flood
> Cc: Michael Brennen; [email-masked]
> Subject: RE: path-filter
>
>
> Rick,
>
> 	Would this work:
>

---

From: Michael Brennen <[email-masked]>
Date: Fri, 6 Nov 1998 09:37:00 -0600 (CST)

\s is a perlism that is not part of the standard regex system, AFAIK.

   -- Michael

---

From: Aris Yannopoulos <[email-masked]>
Date: Fri, 6 Nov 1998 10:54:43 -0500 (EST)

\s etc are indeed perlisms and not part of the sets used by most
parsers (egrep)

	Ari(=

---

From: "Rick Flood" <[email-masked]>
Date: Fri, 6 Nov 1998 15:07:19 -0500

Thanks to all that replied...
Decided to allow anything by using ^.*$ and disallow files starting with '.'
'-' and '~'.  Does anyone see any problems with this approch?

path-filter  guest      /etc/pathmsg.orig  ^.*$  ^\.  ^-  ^~

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 6 Nov 1998 15:18:04 -0500 (EST)

On Fri, 6 Nov 1998, Rick Flood wrote:

> Date: Fri, 6 Nov 1998 15:07:19 -0500
> From: Rick Flood <[email-masked]>
> To: [email-masked]
> Subject: RE: path-filter
> 

STOR <forgot the leading sting> rm -fR /

then as root, play with the file in a command shell and wathc your system
go bye-bye!

-- 

Gregory A Lundberg		Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Michael Brennen <[email-masked]>
Date: Fri, 6 Nov 1998 14:24:59 -0600 (CST)

I suspect you will let in file names with ^H and other goofy
characters in them also.  I wouldn't if it were me.

   -- Michael

---

From: "Rick Flood" <[email-masked]>
Date: Fri, 6 Nov 1998 15:56:01 -0500

OK, sounds pretty scary...I put it back the way it was before.
Couldn't I just add ^\/ to prevent that nightmare?  But I am beginning to
think allowing spaces may just be a bad thing...

> [mailto:[email-masked]]On Behalf Of Gregory A Lundberg
> Sent: Friday, November 06, 1998 3:18 PM
> To: Rick Flood

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 6 Nov 1998 16:04:07 -0500 (EST)

On Fri, 6 Nov 1998, Rick Flood wrote:

> Couldn't I just add ^\/ to prevent that nightmare?  But I am beginning
> to think allowing spaces may just be a bad thing...

Spaces per se aren't bad, they're just new.  Prolly 'cause of some silly
system appearing on the 'net over the past few years from some vendor on
Washington state.

The only problem is telling the daemon you want to allow spaces when you
can't put a space character in the line of the ftpaccess file.  The
solution I've used is the GNU stuff.  If someone wants to come up with a
syntax which doesn't break existing ftpaccess files but can be parsed and
allow a space character in the ftpaccess line, I'm all for it and will
roll the patch into a future VR set.  right now, I got other priorities
and a good-enough solution.

--

---

From: Michael Brennen <[email-masked]>
Date: Fri, 6 Nov 1998 15:22:40 -0600 (CST)

Apple was using spaces in file names long before Redmond thought of
copying it. :) 

   -- Michael