S
S
Sergey Savostin2015-02-07 00:16:19
FTP
Sergey Savostin, 2015-02-07 00:16:19

LFTP: mkdir -p -> Error: File exists?

What kind of misfortune is this with lftp?
I'm trying to create a directory:

lftp -c "set ftp:list-options -a;
open 'ftp.some.com';
mkdir -p /some/folder/new/;
";

If the directory does not exist, it is created. When restarted, it gets hung up on mkdir.
Error in logs
---> MKD /some/folder/new/
<--- 451 Error: File exists.

The latest version. Already tried all "set ftp:*" options...

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor, 2015-02-07
@merryjane

Try using the -f switch like this:
mkdir -p -f /some/folder/new/;

S
Sergey Savostin, 2015-02-07
@savostin

So far I decided with a separate call

lftp -c "set net:max-retries 2;
open 'ftp.some.com';
mkdir -p /some/folder/new/;
";

But it's kind of dumb.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question