#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    3
    Rep Power
    0

    Question how to get real ftp root for logged in user


    hi all

    please help me about php and ftp-root.

    i use the ftp-functions in php. my one and only prob is: how to get the realpath to ftp-root?

    docroot and ftproot are different. if i logged in with ftp-functions, i always get the actual dir like / (a slash).

    is it possible to get the path to user-ftp-root like the doc-root?
  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
    32
    You do not and cannot unless server allows that (most - as in 99.9% - dont). How to check? login with some client and see if it'll show you full path from root or just path from ftp root. Default on ftp servers is not to show path from root, so tough luck - find another way to get what you want.
    While we're at it, why you wanna know full path?
    And you know I mean that.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    3
    Rep Power
    0
    i wanna write an install-script for a php-app. to chmod all scripts for admin, i must login with ftp-user. or is there another way to change to docroot and change the rights and owner to serveradmin?
  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
    32
    >>change the rights and owner to serveradmin
    from the contents, I would think you're talking about some high-guy who is in charge of either ftp or the whole site. If so you do not need to chmod anything, as a rule, he has access to it already.
    And you know I mean that.
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    3
    Rep Power
    0
    yep al, i know that i don't have to chmod after logged in with admin. but i wanna know the path from docroot relative to ftp-root to put all the files correctly on server-directories.

    thx for help
    ..br red

IMN logo majestic logo threadwatch logo seochat tools logo