Hi Dan,
Thank you for the information regarding CURLOPT_FTP_FILEMETHOD. We weren't 
setting it in the code and thus were using CURLFTPMETHOD_MULTICWD by default. 
With CURLFTPMETHOD_SINGLECWD, we can see that the requested folder is being  
accessed directly without making individual CWD commands along the folder tree.
Thanks,
Nimit



________________________________
From: curl-library <[email protected]> on behalf of Dan 
Fandrich via curl-library <[email protected]>
Sent: Monday, October 13, 2025 1:24 PM
To: [email protected] <[email protected]>
Cc: Dan Fandrich <[email protected]>
Subject: Re: Bypass root folder and directly cd to an ftp location

On Mon, Oct 13, 2025 at 04:17:42PM +0000, Nimit Dhulekar via curl-library wrote:
> We're running into an issue when using libcurl (and curl). If the root folder
> of an FTP server denies access for security reasons and we want to directly
> connect to a different folder, this fails with a 550 Permission Denied. This 
> is
> happening because curl is still making an initial connection to "/", and then
> calls cd to change to the requested folder.

I'm not seeing any CWD / with a plain "curl -v ftp://site/some/path"; call using
the current git code. Perhaps this has something to do with other options your
code is setting. Try setting CURLOPT_FTP_FILEMETHOD to CURLFTPMETHOD_SINGLECWD
or even CURLFTPMETHOD_NOCWD and see if that helps.

Dan
--
Unsubscribe: 
https://lists.haxx.se/mailman/listinfo/curl-library<https://lists.haxx.se/mailman/listinfo/curl-library>
Etiquette: 
https://curl.se/mail/etiquette.html<https://curl.se/mail/etiquette.html>
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html

Reply via email to