0

I'm using NcFTP to upload bunch of directories from a server to another (both linux) It succeed at creating, downloading, removing files/folders but failed when I need to overwrite them.

Could not preserve times for /path/logo/xxx.png: UTIME failed. server said: utime(/path/logo/xxx.png): Operation not permitted

So ok, remote server doesn't want me to set files timestamp I guess. Is there a workaround ? I've tried this :

ncftpput -R -o useSITE_UTIME=0 -u user -p mypwd www.site.com /remote/path/ /local/path/

But it doesn't work. Any idea is welcomed.

Volk
  • 1
  • 1
  • 2

3 Answers3

0

I've ran into weird issues with ncftp that I solved by moving to lftp, which is scriptable and has proven a great tool for getting things done when FTP is required.

If you insist on ncftp you should also try -o useSITE_UTIME=1.

the
  • 468
  • 8
  • 23
0

I've moved to lftp too. Which instead of throwing an error about files timestamp, behave as if no error occured... changing file timestamp this time but not their content.

I've found a workaround though by deleting and uploading each file.

I had huge apprehension about ftp command line for production purposes and I can't shake the fact that I was right. I still think SCP is quite better than FTP for files transfers from Linux to Linux but it might be just my misunderstanding of FTP that fools me.

Volk
  • 1
  • 1
  • 2
0

Try this command :

ncftpput -R -o useFEAT=0,useCLNT=1 -u user -p mypwd www.site.com /remote/path/ /local/path/

This should solve your problem.