Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004
    Posts
    164

    FTP MKD cannot create sub-directories, only one dir at a time

    Hi, I am trying to get the WHM backup scripts working with vsFTPd, the problem I am facing is the creating of subdirs that WHM likes to create on the backup destination (MKD /cpbackup/daily/, MKD /cpbackup/weekly/ etc).

    I have traced this to FTP MKD not liking subdirs, I can make individual directories and expand down each MKD call - but this is not how WHM does it, it tries to create the entire directory path in one go.

    On the source connecting to the FTP box i ran the test:

    Code:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> mkd ./test/1/2/3
    550 Create directory operation failed.
    ftp> mkd ./test/1/2
    550 Create directory operation failed.
    ftp> mkd ./test/1
    550 Create directory operation failed.
    ftp> mkd ./test
    257 "/./test" created
    ftp> mkd ./test/1
    257 "/./test/1" created
    ftp>
    On the FTP box:

    Code:
    #cat /var/log/vsftpd.log
    
    Sun May 30 21:44:52 2010 [pid 3620] [backup-gizmo] FTP command: Client "10.10.1.10", "MKD ./test/1/2/3"
    Sun May 30 21:44:52 2010 [pid 3620] [backup-gizmo] FTP response: Client "10.10.1.10", "550 Create directory operation failed."
    Sun May 30 21:44:52 2010 [pid 3620] [backup-gizmo] FAIL MKDIR: Client "10.10.1.10", "/./test/1/2/3"
    Sun May 30 21:44:54 2010 [pid 3620] [backup-gizmo] FTP command: Client "10.10.1.10", "MKD ./test/1/2"
    Sun May 30 21:44:54 2010 [pid 3620] [backup-gizmo] FTP response: Client "10.10.1.10", "550 Create directory operation failed."
    Sun May 30 21:44:54 2010 [pid 3620] [backup-gizmo] FAIL MKDIR: Client "10.10.1.10", "/./test/1/2"
    Sun May 30 21:44:57 2010 [pid 3620] [backup-gizmo] FTP command: Client "10.10.1.10", "MKD ./test/1"
    Sun May 30 21:44:57 2010 [pid 3620] [backup-gizmo] FTP response: Client "10.10.1.10", "550 Create directory operation failed."
    Sun May 30 21:44:57 2010 [pid 3620] [backup-gizmo] FAIL MKDIR: Client "10.10.1.10", "/./test/1"
    Sun May 30 21:45:01 2010 [pid 3620] [backup-gizmo] FTP command: Client "10.10.1.10", "MKD ./test"
    Sun May 30 21:45:01 2010 [pid 3620] [backup-gizmo] OK MKDIR: Client "10.10.1.10", "/./test"
    Sun May 30 21:45:01 2010 [pid 3620] [backup-gizmo] FTP response: Client "10.10.1.10", "257 "/./test" created"
    Sun May 30 21:45:04 2010 [pid 3620] [backup-gizmo] FTP command: Client "10.10.1.10", "MKD ./test/1"
    Sun May 30 21:45:04 2010 [pid 3620] [backup-gizmo] OK MKDIR: Client "10.10.1.10", "/./test/1"
    Sun May 30 21:45:04 2010 [pid 3620] [backup-gizmo] FTP response: Client "10.10.1.10", "257 "/./test/1" created"
    Is there anyway to make vsftps behave in the way it needs to for the WHM scripts to run? The config is shown below:

    Code:
    [root@appsvr1 backup-gizmo]# cat /etc/vsftpd/vsftpd.conf
    
    anonymous_enable=NO
    local_enable=YES
    write_enable=YES
    local_umask=077
    
    #anon_upload_enable=YES
    #anon_mkdir_write_enable=YES
    dirmessage_enable=YES
    xferlog_enable=YES
    connect_from_port_20=YES
    #chown_uploads=YES
    #chown_username=whoever
    #xferlog_file=/var/log/xferlog
    xferlog_std_format=NO
    log_ftp_protocol=YES
    
    #idle_session_timeout=600
    #data_connection_timeout=120
    #nopriv_user=ftpsecure
    #async_abor_enable=YES
    #ascii_upload_enable=YES
    #ascii_download_enable=YES
    #ftpd_banner=Welcome to blah FTP service.
    #deny_email_enable=YES
    # (default follows)
    #banned_email_file=/etc/vsftpd/banned_emails
    #chroot_list_enable=YES
    #chroot_list_file=/etc/vsftpd/chroot_list
    
    chroot_local_user=YES
    #ls_recurse_enable=YES
    listen=YES
    #listen_ipv6=YES
    
    pam_service_name=vsftpd
    userlist_enable=YES
    tcp_wrappers=YES
    I am sure I used proFTPd previously and never faced this issue before. Any ideas much appreciated, thanks in advance.

    Cheers,

    Chris

  2. #2
    Join Date
    Aug 2004
    Posts
    164
    Hi sorry for the bump does anyone have any idea on this?

    Many thanks,

    Chris

  3. Newsletters

    Subscribe Now & Get The WHT Quick Start Guide!

Similar Threads

  1. FTP not listing files and directories on all ftp accounts
    By sh4ka in forum Hosting Security and Technology
    Replies: 3
    Last Post: 09-10-2009, 01:27 PM
  2. Server2Server FTP whole directories and sub-directories
    By Gigaron in forum Hosting Security and Technology
    Replies: 1
    Last Post: 12-23-2007, 05:46 PM
  3. FTP into Home dir.
    By wilfried in forum Dedicated Server
    Replies: 6
    Last Post: 09-13-2003, 11:27 AM
  4. useing php to create dir
    By sessionmedia_070907 in forum Programming Discussion
    Replies: 4
    Last Post: 07-13-2003, 01:39 AM
  5. Changing the default FTP dir
    By Adriaan in forum Dedicated Server
    Replies: 7
    Last Post: 08-21-2002, 07:28 PM

Related Posts from theWHIR.com

Posting Permissions

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