Illegal file names on a Windows 2000 server

    Question by:
    On

    Topics:

    I have a 2K server that was left wide open for ftp.  It has now been 'hacked' and I have about 9GB space that has disappeared to files with illegal names for the files and directories.  They appear to be Mac file names.  I've tried a couple of utilites to rename the files so that I can delete them.  There must be a better way.  I once knew the dos del command that would let me delete files with a space at the end or beginning of a file or diretory name.  Any ideas?
    Good Question?
    0
     

    ?

    The member who asked this question verified this comment provided the solution that solved their problem.

    Accepted Solution on 2003-01-02 at 15:28:40ID: 7658988

    i recently had this happen...ugh.  if you have information in your ftp directory you want to keep you'll need to move it to another folder.  stop the ftp site.  from the command line use the RD /S /Q command. the /S deletes all subfolders and the /Q supresses the OK prompts. RD /? will give you the full proper syntax.  you'll need to delete the entire root folder because you can't "see" the corrupt folder.  after it's deleted recreate the folder, copy all your saved ftp data back and apply some security.  

    verified

    answer

    Enjoy your free answer!

    Join now to get more tech resources.

    Become a member

    Comments

      

    Accepted Solution

    2003-01-02 at 15:28:40ID: 7658988Best
    kaliki earned 50 total points
    i recently had this happen...ugh.  if you have information in your ftp directory you want to keep you'll need to move it to another folder.  stop the ftp site.  from the command line use the RD /S /Q command. the /S deletes all subfolders and the /Q supresses the OK prompts. RD /? will give you the full proper syntax.  you'll need to delete the entire root folder because you can't "see" the corrupt folder.  after it's deleted recreate the folder, copy all your saved ftp data back and apply some security.  
    Good Solution?
    0
     
    CrazyOne

    Expert Comment

    2003-01-02 at 15:55:06ID: 7659150
    Try this open a command window and do this

    Open a CMD.EXE window.
    CD to the top of the mess.
    Use: DIR /X /A   to see the SHORT FILE NAMES of the files and directories there.
    Use a combination of CD, RD, and DEL and the SHORT FILES names reported with DIR /X to delete your way to the bottom and then back up the tree removing the files on the way down and the directories on the way up.
    Most likely there is NOT a protection issue here so you shouldn't need worry about ownership or file protections.

    Also
    How to Remove Files with Reserved Names in Windows
    http://support.microsoft.com/default.aspx?scid=kb;en-us;120716



    The Crazy One
    Good Comment?
    0
     
    kaliki

    Expert Comment

    2003-01-02 at 16:02:41ID: 7659191
    you can work your way back using the commands from crazyone however if your FTP directory is like mine was (full of directories with no names, symbols and some credits to the author totally about 25+ sub directories) it will be painfully time consuming.  crazyone is absolutely correct about file ownership and protection.
    Good Comment?
    0
     
    dpreynolds

    Author Comment

    2003-01-03 at 13:55:51ID: 7665165
    Good suggestion.  I actually did not get to try to solution although it should have worked.  I was able to delete the files by connecting to the server with a Mac client and the files could just be deleted.  
    Good Comment?
    0
     
    tmdgod

    Expert Comment

    2003-02-23 at 21:33:46ID: 8006397
    We had a couple of servers that were left open to anonymous users with write permissions enabled for the ftp server. People took advantage of the open state of the IIS boxes and imediately started to fill the drives with gigs and gigs of data, ranging from .mp3s to full length ripped dvds.  The directory structure was confounding, with ascii characters, blank directories, system reserved naming, and just plain ugly hierarchy. It took me a few days of research to finally find an easy solution of deleting these files which could not be dealt with any conventional form of file removal. I tried everything - even the Microsoft solution did not work for me (suprize!).

    After reading this thread (and several others) I had an Idea, tried it, and poof - all the files and directories are gone! No need for the tedious cd, ren, dir /x stuff that was so frustrating - and did not work.

    Here's what I did:

    Stopped the IIS services
    Copied the APPS\POSIX directory from the Windows 2000 Resource Kit CD to the server
    renamed c:\inetpub\ftproot to c:\inetpub\crap
    moved the c:\inetpub\crap directory into the POSIX directory
    Opened a command prompt and executed:
    C:\POSIX\rm -r crap

    POOF!!! In an instant (well, not really, it deleted over 30 Gb of data) everything was gone in that hideous directory!
    Good Comment?
    0

    Featured Post

     Java Android Coding Bundle

    Whether you're an Apple user or Android addict, learning to code for the Android platform is an extremely valuable, in-demand skill. It all starts with Java, the language behind the apps and games that make Android the top platform it is today.

    Ask Your Tech Question. Get Expert Solutions.We will email you as soon as we have your answer.

    We will never share this with anyone.

    Select topics

    You may select up to five topics.

    Top Expert Contributor

    Essential articles and videos from the Experts

    NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
    Explore the encryption capabilities built into Google Apps and how these features can help you meet privacy policy and regulatory compliance, but are not a full solution. Understand and compare the most popular email encryption services for Google A…
    Want to make your posted content more private? Follow these quick and easy steps to change the display name associated with your posted content.
    Want to pick and choose which updates you receive? Feel free to check out this quick video on how to manage your email notifications.

    More valuable questions with Expert answers

    Question: I have downgraded XP (succesfully!!) and it's working great, a major speed increase! Except that every time I reboot, I have to go straight to Computer Management "Services" and manually start about ten services (themes, DNS, DHCP, network...

    Answer: leave out the % signs. In Windows (DOS), they signify variables. Open Notepad and type the following lines. net start Netman net start Themes net start WZCSVC and etc... Then, save the file as startServices.bat (or whatever name you...

    Question: On my Windows 2008 domain which used to be SBS2003, I have a server running my Windows 2000 hosting my DFS roles. I would like to move the role there to a 2003 R2 server. can you help me find an article about moving the role?

    Answer: install the DFS management and fileserver roles on the 2003 R2. Then using the DFS management interface you can adjust the targets of the DFS after you copy the data from the current server to the new one. DFS roles are not limited to running...

    Question: I have a server 2000 physical box and want to convert it to a vhd for use with Hyper V, I usually use a program called disk2vhd but as its 2000 based it won't work, I've also tried to install a fresh copy of server 2000 and restore from a backup...

    Answer: Disk2VHD uses VSS Shadow Copies to capture the disk, and most other software also uses this method today. Disk2VHD (http://technet.microsoft.com/en-us/sysinternals/ee656415) Most other tools are commerical, and we have used and regular use...

    Question: I have a string here which is supposed to concatenate the days with the word Day1 Day2 etc... in between but only if they exist. Here is the string: =IF(M2="","",CONCATENATE(IF(M2<>"",CONCATENATE("Days1:",M2),""),IF(N2<>"",CONCATENATE("...

    Answer: This happened because the cells contain space characters, You can use trim function to remove space characters as below: =IF(TRIM(M2)="","",CONCATENATE(IF(TRIM(M2)<>"",CONCATENATE("Days1:",M2),""),IF(TRIM(N2)<>"",CONCATENATE("...

    201607-LO-Qu-086

    Extend your technology team with the Experts Exchange community.

    — trusted by —

    Who answers my questions?Our community has technology experts around the world.

    Gerwin Jansen

    5

    Articles

    1,963

    Solutions

    Expert in:

    • Linux
    • Unix OS
    • Linux Distributions
    • Oracle Database
    • Scripting Languages

    Dustin Saunders

    99

    Solutions

    Bryant Schaper

    222

    Solutions

    Expert in:

    • Network Management
    • Networking-Other
    • Windows Networking

    Wayne88

    275

    Solutions

    Expert in:

    • Exchange
    • Windows Server 2008

    martinandrue

    2

    Articles

    1

    Solutions

    RELATED TOPICS view all topics

    1. Windows XP
      (118,170)
    2. Windows Server 2003
      (128,290)
    3. Windows OS
      (99,686)
    4. MS Server OS
      (55,108)
    5. Active Directory
      (71,793)
    6. MS Legacy OS
      (55,043)
    7. Exchange
      (194,433)
    8. Windows Networking
      (49,620)
    9. Windows Server 2008
      (81,463)
    10. Storage Software
      (33,073)
    Receive Monthly Emails of Tech News and Trends from Experts Exchange