Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: an undeleteable file

  1. #1
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default an undeleteable file

    http://www.animeviews.com/.hcc.thumbs/.hcc.\sdcc.jpg+t

    I hope i have the address right, but how would you delete a file with a name like this?

    I get error messages like:
    Code:
    550 Prohibited file name: .hcc.\sdcc.jpg+t : /.hcc.thumbs/.hcc.\sdcc.jpg+t
    or
    Code:
    22:19:54   Delete .hcc.\sdcc.jpg+t
    On folder /.hcc.thumbs 
    Error .hcc.\sdcc.jpg+t (No such file or directory)
    I called up my web host an he referred it to his supervisor who referred it to his supervisor who apparently was able to put it into a folder and manipulate it slightly, but it is still there. No biggie. It doesn't even do anything.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    That looks like FTP to me. From a shell, you can escape the filename:
    Code:
    rm .hcc.\\sdcc.jpg+t
    or use a wildcard:
    Code:
    rm .hcc.*
    It shouldn't present a problem. That is, of course, if you're running a UNIX-based host: it looks as if you are from the paths, but some Windows FTP servers imitate a UNIX filesystem. Windows filesystems have restrictions on what characters may exist in filenames; I don't believe that file can exist on a Windows system.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I use two different ftp programs. One is fireftp and the other is a little known program that is out there called cjgExplorerPro-3.3.

    I am not sure what a shell is. I tried changing the permissions on the file, but that didn't work as the filename that is there is an unpermitted filename and should not exist in the first place

    Because of this it can not be renamed, deleted, and the permissions can't be changed on the file either, but I don't know much about permissions anyway.

    I had a similar named file that I could access on Firefox where Firefox would not change the address for it too much. It was http://www.animeviews.com/c:\data\newt.bmp

    not that it matters. The 'newt' file has already been deleted, but I don't know how. I still have the sdcc file to deal with though. Interesting problem eh? I can probably duplicate the problem again real easy, but I would rather not try it. I think I used a file upload program and renamed the file to something weird like you see above. I may have added quotes as well.
    Last edited by james438; 08-13-2007 at 09:20 PM.

  4. #4
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I am using a unix based host and have recently started a little work on manipulating flat files. I can list them and edit files now, but I am still unable to delete the file. Any ideas?

    I recently tried
    Code:
    <?php
    $file = ".hcc.thumbs";
    if (!rmdir($file))
      {
      echo ("Error deleting $file");
      }
    else
      {
      echo ("Deleted $file");
      }
    ?>
    to remove the directory since the file supposedly doesn't exist. I think that what is really happening is that the browsers and programs that I know of do not recognize the \ character in a filename and so rewrite the filename that I am type into the browser's address bar. I wonder if even PHP does the same thing.

  5. #5
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Make a PHP script in that directory.
    <?php unlink('filename.extension'); ?>

    And it's gone!
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  6. #6
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    lets try something simpler. I can create files into the .hcc.thumbs directory, but I am unable to access them, but I can list them for some odd reason. I tried accessing the file from another folder like so:
    Code:
    <?php unlink('../.hcc.thumbs/me.php'); ?>
    me.php being a test file that I put into the .hcc.thumbs folder. Using cjg-explorerpro-3.3 I was able to delete the me.php file, but not the .hcc.\sdcc.jpg+t file.

    If you want the supposed url to the file is http://www.animeviews.com/hcc.thumbs/.hcc.\sdcc.jpg+t

    The error file I get is
    Warning: unlink(../.hcc.thumbs/me.php) [function.unlink]: No such file or directory in /home/content/a/n/i/animeviews/html/test.php5 on line 1
    No worries. It is a complicated problem. I called my host at godaddy and he was unable to delete it so he called his supervisor who was unable to delete it so he called his supervisor who was also unable to delete it so he called technical support and apparently they moved it into its own folder instead of deleting it.

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    ?
    Code:
    twey@peordh /tmp/f/.hcc.thumbs $ ls -a
    .  ..
    twey@peordh /tmp/f/.hcc.thumbs $ touch .hcc.\\sdcc.jpg+t
    twey@peordh /tmp/f/.hcc.thumbs $ ls -a
    .  ..  .hcc.\sdcc.jpg+t
    twey@peordh /tmp/f/.hcc.thumbs $ rm .hcc.\\sdcc.jpg+t
    twey@peordh /tmp/f/.hcc.thumbs $ ls -a
    .  ..
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    I assume you are asking a question with the question mark and the following section was you demonstrating how to delete the file from another directory. I take it ls lists the files in a directory or the stats of a particular file. I have no idea what the -a is. list all of the files? dunno. twey@peorh, dunno what that is either. Nor do I know who the question is directed at if it even is a question.

    near as I can tell you are referrencing http://us3.php.net/manual/en/function.shell-exec.php That area of PHP is well beyond my scope of understanding at present.

    please elaborate or someone please explain what he just said. If you need more info from me let me know too and I'll see what I can do.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I was merely demonstrating how simple it is to remove such a file, at least on a *nix host. twey@peordh /tmp/f/.hcc.thumbs $ is my prompt. ls -a lists all files; touch creates a file if one doesn't already exist; rm deletes a file. I had no issues deleting that file, and your host shouldn't have either. I suggest finding another host, as your current is evidently incompetent.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Jan 2007
    Location
    Davenport, Iowa
    Posts
    2,385
    Thanks
    100
    Thanked 113 Times in 111 Posts

    Default

    That could be. I supposed the old adage holds true here that you get what you pay for since I pay for next to nothing for their services. PHP has many different areas like image manipulation, flat file manipulation, regular expressions and about a hundred different areas of which there are only few that I am familiar with. This is one that may be simple, but is completely foreign to me at present and is not one I plan on becoming an expert in, but I will stick with it till I can figure out how to get rid of this file.
    Last edited by james438; 11-16-2007 at 03:46 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •