#87 Problems if the second Directory doesnt exists

0.6.1
open-fixed
nobody
None
6
2014-08-17
2010-04-13
BMU
No

wput version: 0.6.2
Running on Scientific Linux ( 2.6.18-128.4.1.el5 #1 SMP i686 i686 i386 GNU/Linux)

When I use the following Command (expected both directories doesn't exists)
wput -l 1M -v -v -o ./logfile.txt --basename=/home/user/temp/shell/01.00.00 /home/user/temp/shell/01.00.00/ ftp://a:a@ftpserver/
The First Directory gets created but when wput tries to change to the second directory is doesn't work.
Then it tries the mkd .. (Which makes no sense for me???)

debug output:
-------------------------
Added file `/home/user/temp/shell/01.00.00/' to queue.
Added URL `ftp://a:a@ftpserver/' to queue.
processing queue:
File: `/home/user/temp/shell/01.00.00/'
URL : `ftp://a:a@ftpserver/'
IP of `ftpserver' is `1.2.3.4'
PRE_GUESS: local_file: /home/user/temp/shell/01.00.00/
remote_path: remote_file: (0)
Dir entry name: .
Dir entry name: ..
Dir entry name: ZIC-01.00.00
Dir entry name: .
Dir entry name: ..
Dir entry name: LXDFE
Dir entry name: .
Dir entry name: ..
Dir entry name: pack
Dir entry name: .
Dir entry name: ..
Dir entry name: hihi.txt
fname: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/hihi.txt (url: ftp://a:a@ftpserver/)
Dir entry name: more.txt
fname: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/more.txt (url: ftp://a:a@ftpserver/)
Dir entry name: boot2
Dir entry name: .
Dir entry name: ..
Dir entry name: kig.txt
fname: /home/user/temp/shell/01.00.00/boot2/kig.txt (url: ftp://a:a@ftpserver/)
directory added successful
fsession free()d
ignoring unbuild fsession
IP of `ftpserver' is `1.2.3.4'
PRE_GUESS: local_file: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/hihi.txt
remote_path: remote_file: (0)
POST_GUESS: local_file: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/hihi.txt
remote_path: /ZIC-01.00.00/LXDFE/pack remote_file: hihi.txt
Searching for skip_entry ftp://a:a@1.2.3.4:21//ZIC-01.00.00/LXDFE/pack
--12:07:07-- `/home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/hihi.txt'
=> ftp://a:xxxxx@1.2.3.4:21//ZIC-01.00.00/LXDFE/pack/hihi.txt
starting again
Connecting to 1.2.3.4:21... c_sock: 4
initiating timeout connect (300)
Checking whether 4 is writable... 1 (115:Operation now in progress)
connected[220] 'FileZilla Server version 0.9.34 beta written by Tim Kosse (Tim.Kosse@gmx.de) Please visit http://sourceforge.'
!
Logging in as a ... ---->USER a
Checking whether 4 is writable... 1 (115:Operation now in progress)
[331] 'Password required for a'
Checking whether 4 is writable... 1 (115:Operation now in progress)
[230] 'Logged on'
Logged in!
previous directory: target: ZIC-01.00.00/LXDFE/pack
==> CWD ZIC-01.00.00/LXDFE/pack---->CWD ZIC-01.00.00/LXDFE/pack
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'CWD failed. "/ZIC-01.00.00/LXDFE/pack": directory not found.'
failed (CWD failed. "/ZIC-01.00.00/LXDFE/pack": directory not found.).
==> CWD ZIC-01.00.00---->CWD ZIC-01.00.00
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'CWD failed. "/ZIC-01.00.00": directory not found.'
failed (CWD failed. "/ZIC-01.00.00": directory not found.).
==> MKD ZIC-01.00.00---->MKD ZIC-01.00.00
Checking whether 4 is writable... 1 (115:Operation now in progress)
[257] 'Directory created successfully'

==> CWD ZIC-01.00.00---->CWD ZIC-01.00.00
Checking whether 4 is writable... 1 (115:Operation now in progress)
[250] 'CWD successful. "/ZIC-01.00.00" is current directory.'

==> MKD LXDFE---->MKD LXDFE
Checking whether 4 is writable... 1 (115:Operation now in progress)
[257] 'Directory created successfully'

==> CWD LXDFE---->CWD LXDFE
Checking whether 4 is writable... 1 (115:Operation now in progress)
[250] 'CWD successful. "/ZIC-01.00.00/LXDFE" is current directory.'

==> MKD pack---->MKD pack
Checking whether 4 is writable... 1 (115:Operation now in progress)
[257] 'Directory created successfully'

==> CWD pack---->CWD pack
Checking whether 4 is writable... 1 (115:Operation now in progress)
[250] 'CWD successful. "/ZIC-01.00.00/LXDFE/pack" is current directory.'

==> TYPE A ... ---->TYPE A
Checking whether 4 is writable... 1 (115:Operation now in progress)
[200] 'Type set to A'
done.
==> SIZE hihi.txt ... ---->SIZE hihi.txt
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'File not found'
failed.
local_fsize: 0
target_fsize:
resume_table: 1,0,2
Portmode: 0
==> PASV ... ---->PASV
Checking whether 4 is writable... 1 (115:Operation now in progress)
[227] 'Entering Passive Mode (135,246,110,21,17,252)'
done.
Remote server data port: 1.2.3.4:4604
c_sock: 6
initiating timeout connect (300)
Checking whether 6 is writable... 1 (115:Operation now in progress)
Disabling resuming due to ascii-mode transfer
==> STOR hihi.txt ... ---->STOR hihi.txt
Checking whether 4 is writable... 1 (115:Operation now in progress)
[150] 'Connection accepted'
done.
Length: 0
0K Closing socket 877b378

[226] 'Transfer OK'
12:07:07 (hihi.txt) - ` --.--' [0]

IP of `ftpserver' is `1.2.3.4'
PRE_GUESS: local_file: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/more.txt
remote_path: remote_file: (0)
POST_GUESS: local_file: /home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/more.txt
remote_path: /ZIC-01.00.00/LXDFE/pack remote_file: more.txt
Searching for skip_entry ftp://a:a@1.2.3.4:21//ZIC-01.00.00/LXDFE/pack
--12:07:07-- `/home/user/temp/shell/01.00.00/ZIC-01.00.00/LXDFE/pack/more.txt'
=> ftp://a:xxxxx@1.2.3.4:21//ZIC-01.00.00/LXDFE/pack/more.txt
starting again
==> SIZE more.txt ... ---->SIZE more.txt
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'File not found'
failed.
local_fsize: 4
target_fsize:
resume_table: 1,0,2
Portmode: 0
==> PASV ... ---->PASV
Checking whether 4 is writable... 1 (115:Operation now in progress)
[227] 'Entering Passive Mode (135,246,110,21,17,253)'
done.
Remote server data port: 1.2.3.4:4605
c_sock: 6
initiating timeout connect (300)
Checking whether 6 is writable... 1 (115:Operation now in progress)
Disabling resuming due to ascii-mode transfer
==> STOR more.txt ... ---->STOR more.txt
Checking whether 4 is writable... 1 (115:Operation now in progress)
[150] 'Connection accepted'
done.
Length: 4
0K Checking whether 6 is writable... 1 (115:Operation now in progress)
Closing socket 8779b58

[226] 'Transfer OK'
12:07:07 (more.txt) - ` 1.32K/s' [4]

IP of `ftpserver' is `1.2.3.4'
PRE_GUESS: local_file: /home/user/temp/shell/01.00.00/boot2/kig.txt
remote_path: remote_file: (0)
POST_GUESS: local_file: /home/user/temp/shell/01.00.00/boot2/kig.txt
remote_path: /boot2 remote_file: kig.txt
Searching for skip_entry ftp://a:a@1.2.3.4:21//boot2
--12:07:07-- `/home/user/temp/shell/01.00.00/boot2/kig.txt'
=> ftp://a:xxxxx@1.2.3.4:21//boot2/kig.txt
starting again
previous directory: ZIC-01.00.00/LXDFE/pack target: boot2
==> CWD ../../../boot2---->CWD ../../../boot2
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'CWD failed. "/boot2": directory not found.'
failed (CWD failed. "/boot2": directory not found.).
==> CWD ..---->CDUP
Checking whether 4 is writable... 1 (115:Operation now in progress)
[200] 'CDUP successful. "/ZIC-01.00.00/LXDFE" is current directory.'
failed (CDUP successful. "/ZIC-01.00.00/LXDFE" is current directory.).
==> MKD ..---->MKD ..
Checking whether 4 is writable... 1 (115:Operation now in progress)
[550] 'Directory already exists'
failed (Directory already exists).
Added skip_entry ftp://a:a@1.2.3.4:21/boot2
Failed to change to target directory. Skipping this file/dir.
processing queue:
Connection ended. (877ae30)
Checking whether 4 is writable... 1 (115:Operation now in progress)
---->QUIT
Checking whether 4 is writable... 1 (115:Operation now in progress)
[221] 'Goodbye'
Closing socket 877ae30
FINISHED --12:07:07--
Transfered 4 bytes in 2 files at 46.60B/s
Transmission of 1 file failed.

Discussion

  • BMU
    BMU
    2010-04-13

    • priority: 5 --> 6
     
  • Rumpeltux
    Rumpeltux
    2010-04-13

    • status: open --> pending-fixed
     
  • Rumpeltux
    Rumpeltux
    2010-04-13

    Thanks for your report. Apparently wput was treating the 200 success of the CDUP command as a failure.
    This is fixed in the repository now, thus your case should be working.

     
  • BMU
    BMU
    2010-04-13

    • status: pending-fixed --> open-fixed
     
  • BMU
    BMU
    2010-04-13

    Hi rumpeltux,

    sorry to ask...,
    but how do I get the updated version?

     
  • Rumpeltux
    Rumpeltux
    2010-04-13

    You can grab the latest source-code from the git repository:
    git clone git://wput.git.sourceforge.net/gitroot/wput/wput

     
  • BMU
    BMU
    2010-04-13

    Hi,
    Thanks again..
    Any Idea when a new release will be available?

    Regards
    B.

     
  • Rumpeltux
    Rumpeltux
    2010-04-13

    Nope. Maybe at some point when I have too much time and feel like there’s been too many fixes not to make a new release.
    There is no more active development in wput.

     
  • BMU
    BMU
    2010-04-14

    Hi rumpeltux,

    sorry to bother you again...
    two things...
    1. is there a manual how to compile? Or can you describe me how to do? install.sh -> needed preconditions?
    2. are there alternatives you know? Or why is the development on wput stopped?

    Regards
    B.

     
  • Rumpeltux
    Rumpeltux
    2010-04-14

    Read the INSTALL file for instructions on compiling. You’ll need at least a build-essentials like package.
    For alternatives you can try curl or ncftpput.

     
  • BMU
    BMU
    2010-04-15

    Hi Rumpeltux,

    just for my interest. (You can tell me when I bother you :-)

    you've changed this code
    - if(self->r.code != 250) {
    + // CWD answers with 250, CDUP with 200
    + if(self->r.code != 250 || self->r.code == 200) {

    should't it be if(self->r.code != 250 || self->r.code != 200) {
    Or am I wrong.
    Also even with your or my changes it doesn't seem to work :-(

    Currently only the first two directory will be created (which contains only another Directory)
    01.00.00 and ZIC--01.00.00 will be created?

    Regards
    B.