Web Analytics Made Easy -
StatCounter Invisible files/folders in WS-FTP - CodingForum

Announcement

Collapse
No announcement yet.

Invisible files/folders in WS-FTP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Invisible files/folders in WS-FTP

    I recently tried to implement a multi-user PHP upload script on my site, but it didn't really work out so I eventually decided to delete it and find a different script.
    But something weird has happened - some of the sub-folders and files in them have become invisible and in one folder, although the files (some .gif's and .php's) are visible WS-FTP won't allow me to delete them.

    I tried to install PhpMyExplorer if that's any help - I've posted a message on the forum at it's homepage:http://elegac.free.fr/commun/index.p...true&langue=uk
    but I thought I might get a better response here.

    Does anyone know how I could delete these files and folders to stop them cluttering up my webspace?? Thanks

  • #2
    You might want to check that they have the chmod values of 777.

    Right click on the file and then chose the option chmod. Make sure that all 9 options are checked. Once you have done that then try and delete them

    Hope this helps

    wabirdman
    www.myspace.com/lostsaintsrocks

    Comment


    • #3
      & if that does not the problem is probably ownership

      because the uploaded files were 'created' via script they are now owned by apache and not you (username)..

      if you have SSH access then login and delete the files from there, else CHOWN them to 'username' 'username' and you should be able to delete them via FTP

      you can also try deleting them via script

      PHP Code:
      <?
      unlink
      ('this.gif');
      ?>
      but if your host allows SSH it is far easier!
      resistance is...

      MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

      Comment


      • #4
        Please forgive my ignorance, but what is 'CHOWN'? And I don't think I have SSH access - although I probably wouldn't know if I did!
        And I don't really understand what you mean by 'deleting via a script' - what do I name this script and where do I put it?
        I am unable to CHMOD the folders - I get an error - "550: Permission denied".

        Thanks for your help!

        Comment


        • #5
          CHOWN takes ownership of the file, CHOWN -user- would make that user the owner of that file...unless you have root access, only the owner of a specific file can perform actions on that specific file (this often can include directories). When a script creates a directory/file, unless it is wrapped in a setuid wrapper, the file/directory is owned by 'nobody' (at least on apache, typically). When you log in, you login as you, not as nobody, thus the files become off limits to you...which is where CHOWN comes into play.
          Moderator, Perl/CGI Forum
          shadowstorm.net - subvert society

          Comment


          • #6
            save this as whatever.php in the same folder as your images just cjange the name of the file to suit one of the images you want to lose..


            <?
            unlink('this.gif');
            ?>

            then call that file in your browser i.e. yourdomain.com/folder/whatever.php

            and see if it deletes the file for you, if it does post again and we can make a script that deletes all the files in a given folder for you - just need to know if it works first
            resistance is...

            MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

            Comment


            • #7
              Thanks, but it won't even let me upload the whatever.php to the same folder (550: permission denied)......

              This is the url to the folder that contains the images and .php files:
              Last edited by opheliana; Jul 10, 2002, 03:00 PM.

              Comment


              • #8
                Ah, so the directory isn't owned by you either...

                If that directory resides in another directory that is owned by you, then you can delete that directory entirely. Or you can run the script as nobody outside of the directory you are trying to work with and remove the files that way...(or the directory in entirety)

                Try

                PHP Code:
                <?
                    unlink
                ("/local/server/path/to/directory/this.gif");
                ?>
                Moderator, Perl/CGI Forum
                shadowstorm.net - subvert society

                Comment


                • #9
                  Right, so I created a file called whatever.php and placed the above code in it with the path to the directory. I put this .php in my base directory (www.opheliana.net/whatever.php) and this is what it came out with:

                  Warning: Unlink failed (No such file or directory) in /home/www/ophelian/whatever.php on line 2

                  No such file or directory? But they do exist!

                  Comment


                  • #10
                    Sorry - ignore the last post - all files have been deleted! Thanks for that little piece of code, I'll keep it for future use
                    However, the directory which housed the files will still not budge....any ideas?

                    Comment

                    Working...
                    X