GNURLOPT_FTP_ACCOUNT(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

✨ 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