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