GNURLOPT_FTP_ACCOUNT(3)
β¨ NAME β¨
Okay bestie, welcome to the GNURLOPT_FTP_ACCOUNT(3) page from the curl_easy_setopt options manual π
β¨. This one is all about CURLOPT_FTP_ACCOUNT β set account info for FTP. Yes, it's giving very specific FTP energy, and we respect it π«Ά.
β¨ SYNOPSIS β¨
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char
*account);
β¨ DESCRIPTION β¨
Pass a pointer to a null-terminated string β or NULL to disable β as account. When an FTP server asks for "account data" after user name and password has been provided, this data is sent off using the ACCT command π.
Your application does not have to keep the string around after setting this option. Curl is not asking you to babysit that string forever, bestie π.
β¨ DEFAULT β¨
NULL πΈ. That's the default, no cap.
β¨ PROTOCOLS β¨
FTP π¦. That's the whole protocol vibe here.
β¨ EXAMPLE β¨
CURL *curl = curl_easy_init();
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");
curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");
ret = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
β¨ AVAILABILITY β¨
Added in 7.13.0 β. Historic icon behavior, honestly.
β¨ RETURN VALUE β¨
CURLE_OKβ the option is supported, slay βCURLE_UNKNOWN_OPTIONβ the option is not supported πCURLE_OUT_OF_MEMORYβ there was insufficient heap space π
β¨ SEE ALSO β¨
Go peek at CURLOPT_USERNAME(3) and CURLOPT_PASSWORD(3), bestie π«Ά.
This iconic little page is from libcurl 7.37.0, dated 19 Jun 2014, and it is the GNURLOPT_FTP_ACCOUNT(3) page β periodt ππ
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms