Thread: ftp question

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    13

    ftp question


    What is the best way, to find out the directory, where web documents stored, on a .nix web server?
    I need that, because I want to install my application files on clients web server directly and automatically from my web server using ftp.
  2. #2
  3. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    You'll need to connect manually and look some something like 'public_html' or 'htdocs' or something that'll resemble web files folder. Of course, you could write script to do that, but you can't really think of all the possibilities there're to name web folder.
    And you know I mean that.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    13

    thanks


    Thanks AlCapone,

    Calling the web site with the domain name, like www.someweb.com and finding out the exact location of the served page, say index.html. That was my plan. Better to explain, some function what ftp_pwd while using ftp does. Is it not possible?
  6. #4
  7. Mobbing Gangster
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Sep 2001
    Location
    "Best City" 2002 and 2003- Melbourne, Australia
    Posts
    4,912
    Rep Power
    33
    Is this possible? yes. Is it reliable? no.
    It depends strictly on ftp server whether or not to show full path to the dir (or use ftp root dir as / for ftp users). However, it is possible to see full path name for http files, just use __FILE__ in php. But again, that will require you to upload file through ftp, and how is that different from connecting and checking manually.
    And you know I mean that.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    52
    Rep Power
    13
    Hi again AlCapone,

    I have decided to do the followings,

    I have created a spioner file, which includes
    getenv("DOCUMENT_ROOT");
    and send the path to my installation manager file.
    I will ask the customer to send it to his/her web server manually, and run that to begin the installation.
    Than I will be able to ftp upload application files automatically to the web folder.

    So the solution is half automatically.

    Thanks for your help.

IMN logo majestic logo threadwatch logo seochat tools logo