Operating System - HP-UX
1836617 Members
2575 Online
110102 Solutions
New Discussion

FTP too fast for transfer to Win server

 
SOLVED
Go to solution
Raynald Boucher
Super Advisor

FTP too fast for transfer to Win server

hello all

We have just run into an interesting problem with FTP since migrating a file server form Linux to a Microsoft platform.

batch FTP from our application server no longer works because the filserver (appears to) takes too long to set permissions creating directories and setting permissions.

The ftp command file contains:
mkdir testrb
cd testrb
put sort_bkup_list
mkdir testrb2
cd testrb2
put sort_bkup_list
mkdir testrb3
cd testrb3
put sort_bkup_list
quit

the results are:
$ ftp persephone < ftptest
sort_bkup_list: Permission denied
testrb2: Permission denied
testrb2: No such file or directory
sort_bkup_list: Permission denied
testrb3: Permission denied
testrb3: No such file or directory
sort_bkup_list: Permission denied

Only the first directory is created but looks like permissions are not set for next commands.
subsequent execution will create the second directory and stop there and so on.

Has anyone ever encountered such a problem?

Thanks
5 REPLIES 5
TwoProc
Honored Contributor

Re: FTP too fast for transfer to Win server

I didn't see this particular problem before, but I always had crazy problems hosting an NFS mount point from a Windoze server with that Unix toolkit (or whatever they call it) for Windows.

Make your programmers write to and from sftp services for data exchange rather than use a cruddy mount point that will only cause you issues. It's more work, but more robust.
We are the people our parents warned us about --Jimmy Buffett
Olivier Masse
Honored Contributor
Solution

Re: FTP too fast for transfer to Win server


Sounds like a multithreading problem on the server, although I'm sure you would not be the only one with this problem if it was a bug in IIS. Have you checked this in the Microsoft KB?

HP-UX's stock FTP client doesn't have a pause or sleep function that could be used to slow down the batch commands. One thing you can try is escaping to the shell to make a pause with something such as "!/usr/bin/sleep 1" before each of your puts. If that still doesn't work, you can try using an alternate FTP client such as ncftp just to see if it helps.

Olivier
rick jones
Honored Contributor

Re: FTP too fast for transfer to Win server

If the FTP server needs to be setting permissions as part of the mkdir command, it should not be sending the completion back on the control channel until after that is done. If it is sending the completion ahead of the work actually being complete, that is a bug in the FTP server code that needs to be addressed.

Others have suggested escaping to sleep for a bit. Again I think this is a bug in the FTP server that needs to be fixed, but another possible kludge could be to try adding an ls/dir command between the mkdir and the cd (or perhaps between the cd and the put). Perhaps that will act as a "flush" on the permissions issue.

You could also try reordering the commands to create the heirarchy before attempting the puts - from your output it seems the mkdir of the subdirs actually succeeds, so perhaps by the time you've created the third directory, the first one will allow the put.

The other fix would be to migrate back to the original OS.
there is no rest for the wicked yet the virtuous have no pillows
Raynald Boucher
Super Advisor

Re: FTP too fast for transfer to Win server

Gents!

the !/usr/bin/sleep solution works (I used 2 seconds).

We are writing to an nsf mounted file system on an intermediary server. Are there (mount or share) settings that could alleviate the problem?

As to writing directly to target, It is currently contrary to policy/firewall rules.

Thanks

RayB
Raynald Boucher
Super Advisor

Re: FTP too fast for transfer to Win server

Finally got to assign points... had problems connecting for a while.

Thanks for support.

RayB