Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Remove Files in Root Directory of FTP Server Using lftp Mirror with ./ #747

Open
idanSap opened this issue Dec 16, 2024 · 0 comments

Comments

@idanSap
Copy link

idanSap commented Dec 16, 2024

I’m using lftp version 4.9.3 to synchronize files to an FTP server, but I’m encountering an issue where I can’t delete files in the root directory of the server. I’ve tried using the following script:

set ftp:ssl-allow no;
open -u $FTP_USER,$FTP_PASS $FTP_HOST;
mirror —reverse —delete - ./ —exclude ‘^\..*$’; bye”

During the execution of this script, I get the following error:


Removing old file `EXAMPLE_FILE.txt’
rm: Access failed: 550 File Not Found (EXAMPLE_FILE..txt)

However, when I manually log in to the FTP server and attempt to delete a file in the root directory without the ./ prefix, it works fine. For instance, the following commands work:

rm EXAMPLE_FILE.txt
rm ./EXAMPLE_FILE.txt

It appears that lftp might be creating a file path with ./ that the server is unable to handle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant