Subject: strange directory in ~ftp/incoming

From: [email-masked] (pwarner)
Date: Wed, 18 Oct 95 15:17:11 CDT

I have been running wuftpd 2.4 for a couple of months.  I have created an 
incoming directory off the chroot'ed anonymous fto directory.  The permissions 
were set so that thing uploaded would be "invisible" once put there.  Someone, 
either through error or design, has created some wacked out directory that I 
can't get rid of.

1).  How do I remove the "." owned by ftp?
2).  How do I prevent this from happening again?

ftpaccess:
upload /users/ftp * no
upload /users/ftp /incoming yes root other 0600

directory from ftp's anonymous chroot:
drwx-wx-wx   3 root     root         512 Oct 18 11:47 incoming

ls -lat from ~ftp/incoming:
drwx-wx-wx   3 pwarner  other        512 Oct 18 11:47 .
-rw-rw-r--   1 ftp      ftp        48117 Oct 18 11:47 install.doc
-rw-rw-r--   1 ftp      ftp        60278 Oct 18 11:47 inst.txt
-rw-r--r--   1 pwarner  1002         432 Oct  5 10:52 .message
drwxrwxr-x   2 ftp      ftp          512 Sep 12 13:59 .
dr-xr-xr-x   8 ftp      other        512 Aug 14 10:10 ..

-- Paul Warner
[email-masked]

---

From: Jeffrey Weiss <[email-masked]>
Date: Wed, 18 Oct 1995 15:59:49 -0500 (CDT)

> 2).  How do I prevent this from happening again?

1. Find the inode assigned to the file using the "ls -li" command.

Let's say that the inode # you find is "inode#"

Use the find command to blow the file away by it inode number:

"find . -inum inode# -exec rm -rf {} \;  "

This searches through the current directory for the offending crap and 
sends it straight to bitbliss.

Try it in a meaningless directory using meaningless files until you get 
the technique working properly! Note the spacing, too.

2. The example ftpaccess.heavy file shows how to limit acceptable user
input to printable, "reasonable" text. Here's that example.

Note that this is simply UNIX regular expressions. (simple!?)

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

Also check out page 89 of O'Reilly "Managing INTERNET information 
services" GREAT text for this kinda stuff.

Good luck. Those children out there will stop at nothing to use your ftp 
archive as a dumping ground for total crap using hidden directories.

Be careful to make SURE you don't remove your 'real' . directory, 
though; doublecheck it all from a directoy up if you're unsure.

jeff 

> dr-xr-xr-x   8 ftp      other        512 Aug 14 10:10 ..

___________________________________________________________________________
Jeffrey Weiss UNIX administrator    [email-masked]
TIES - Technology and Information Educational Services www.ties.k12.mn.us
(612)638-2311  fax (612)631-7519 1925 W. County Rd. B2,  Roseville, MN 55113