CURLOPT_FTP_ACCOUNT(3)

πŸ’… CURLOPT_FTP_ACCOUNT(3) πŸ’…

from the Library Functions Manual, bestie β€” this is the account info for FTP page and we’re gonna make it make sense ✨

πŸŽ€ NAME πŸŽ€

CURLOPT_FTP_ACCOUNT β€” account info for FTP πŸ¦‹

✨ SYNOPSIS ✨

#include <curl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_FTP_ACCOUNT, char *account);

🌸 DESCRIPTION 🌸

okay so literally pass a pointer to a null-terminated string β€” or NULL to disable it πŸ’…. When an FTP server asks for β€œaccount data” after username and password have been provided, this data gets sent off using the ACCT command πŸ”₯.

The application does not have to keep the string around after setting this option 🫢.

Using this option multiple times makes the last set string override the previous ones, no cap. Set it to NULL to disable its use again πŸ™ˆ.

πŸ’– DEFAULT πŸ’–

NULL β€” iconic empty vibes ⭐

πŸ¦‹ PROTOCOLS πŸ¦‹

This functionality affects ftp only πŸ’œ

πŸ“ EXAMPLE πŸ“

int main(void)
{
  CURL *curl = curl_easy_init();
  if(curl) {
    CURLcode result;
    curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/foo.bin");

    curl_easy_setopt(curl, CURLOPT_FTP_ACCOUNT, "human-resources");

    result = curl_easy_perform(curl);

    curl_easy_cleanup(curl);
  }
}

🌈 AVAILABILITY 🌈

Added in curl 7.13.0 β€” vintage but still iconic πŸ‘‘

πŸ’€ 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) 🚨.

πŸŽ€ SEE ALSO πŸŽ€


xoxo, this page is from libcurl, dated 2026-10-12, and it’s literally CURLOPT_FTP_ACCOUNT(3) β€” you ate that, bestie πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from