[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Parsing a file name in the shell



On Wed, Feb 06, 2002 at 10:26:47AM -0500, Ron Mullins wrote:
> Can someone help me this? We run a FTP server that has constant
> scriptkiddie activity, i.e. uploading of warez. I would like to automate
> the removing of directories, as they are always a number, but I can't
> figure out how to test whether the name is or starts with a number.
> 
> Does anyone have some good ideas or experience with this? Shell
> scripting isn't one of my strong points. The server is Debian Woody.
> Please CC me as I am not currently subscribed to the list.
> 
> P.S. I'm using Pure-FTP and have it setup so that the Warez cannot be
> downloaded, so they can't get it back off, but it is annoying to have to
> do this manually. Annonymous uploads are needed so I can't turn that
> feature off. Thanks in advance.

I see other people have replied with shell solutions ... I'm wondering
if your problem couldn't be solved administratively.

Right now, I assume you have a world writable dir like "upload" and
the script kiddies are putting warez in there.  The way I've seen this
problem solved most often is you set the perms on upload to "0111",
and then create writable subdirectories in upload as required.  For
example, when customer foo needs to upload, create a dir
"upload/foo-02052002" and tell them to cd there before doing the
upload.

If this doesn't fit into the way your server works, sorry for wasting
your time :)

-- 
Nathan Norman - Staff Engineer | A good plan today is better
Micromuse Ltd.                 | than a perfect plan tomorrow.
mailto:nnorman@micromuse.com   |   -- Patton

Attachment: pgptNCHSHSzJH.pgp
Description: PGP signature


Reply to: