CURLOPT_FTP_USE_EPSV(3)
π CURLOPT_FTP_USE_EPSV(3)
okay so bestie, welcome to the CURLOPT_FTP_USE_EPSV(3) page β that's from the Library Functions Manual, and yes it's about FTP, don't scroll away, it's actually cute I promise π«Ά
β¨ NAME β¨
CURLOPT_FTP_USE_EPSV β literally just "use EPSV for FTP" π«
πΈ SYNOPSIS πΈ
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_USE_EPSV, long epsv);
π¦ DESCRIPTION π¦
so you pass epsv in as a long, right? and if that value is 1, it tells curl "hey queen, use the EPSV command when doing passive FTP downloads" β which, btw, it already does by default, she's an overachiever like that π
using EPSV means libcurl first attempts to use the EPSV command before using PASV. and if you pass zero to this option? then nope, no EPSV for you, only plain PASV. simple as π
the EPSV command is a slightly newer addition to the FTP protocol than PASV and it's the preferred command to use since it enables IPv6 to be used β¨ iconic behavior truly. but lowkey, old FTP servers might not support it, which is why libcurl has a fallback mechanism. and sometimes that fallback is not enough π and then this option might come handy. iykyk.
heads up bestie: if the server is an IPv6 host, this option has no effect. like, zero. nada. it's doing nothinggg π
π DEFAULT π
1
π PROTOCOLS π
this functionality affects ftp only. that's it. that's the whole list. periodt. π
π₯ EXAMPLE π₯
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL,
"ftp://example.com/old-server/file.txt");
/* let's shut off this modern feature */
curl_easy_setopt(curl, CURLOPT_FTP_USE_EPSV, 0L);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
look at that comment β "let's shut off this modern feature" β the original author was in their era fr fr π
β AVAILABILITY β
Added in curl 7.9.2 β a certified classic, vintage, main character energy π
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK π₯³ β non-zero means an error occurred π, see libcurl-errors(3) for the deets.
π SEE ALSO π
and that's the whole page bestie, no cap π this lil' beauty came to you from libcurl, dated 2026-10-12, filed under CURLOPT_FTP_USE_EPSV(3) β slay, go configure your FTP, you've got this π§β¨
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms