Re: ftp root dir?



What I ended up doing was to make a dir with ftp_mkdir(). Then test it with file_exists() to see if it is where I expected. If not, I post a die() error msg and say "tech support required". Tech support can then figure out where the ftp root dir is. and set a config file accordingly.

Thanks.......

Johan Holst Nielsen wrote:
Al wrote:
Can I assume that all ftp_connect()s will make the current dir the DOC_ROOT?

First of all - what do you mean with DOC_ROOT? If it is the document root (of what?!).

If not, how can I insure the ftp root dir is the same as DOC_ROOT?

Define DOC_ROOT :)

if you ftp_chdir() and it's already on the root, it posts an error.

Well if you tries to go back to the root - try to use ftp_cdup - but it shouldn't be needed if you combine ftp_pwd and ftp_chdir

ftp_pwd() simply returns "/", which simply says it's on its root, where ever that is.

If is (logical) the root of the ftp server. It can be whereever on the server. It depends on the configuration of the FTP server ;)

.



Relevant Pages

  • RE: FTP server
    ... Then you root become /var/www. ... > Subject: FTP server ... > Both accounts need full permissions. ... unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe ...
    (RedHat)
  • Re: /etc/mailname and cron
    ... checked and cron depends on postfix or mail-transport-agent. ... these files may give you a clue about what is happening to mail to root. ... and the config file may be somewhat different than ... Much thanks to you Tony and to derek also. ...
    (Ubuntu)
  • Re: DNS caching
    ... > chroot security, and mentions putting the dump file elsewhere. ... > For the config file, ... The data directory is owned by root and root and named can rwx it. ...
    (comp.os.linux.misc)
  • Re: Multi-user 3D acceleration
    ... Foxy wrote: ... > All the users are in the video group and 3d works for them fine unless two ... Try running 2 sessions as root to see if they both ... I just found some 3D switches in my .config file I was unaware of. ...
    (alt.os.linux.suse)
  • Re: help with permissions
    ... Read the documentation for the FTP server! ... ONLY that same user (well, and root, maybe because root owns the ... can delete files/directories that they have created. ... Have another read of chmod man & info pages? ...
    (comp.os.linux.misc)