cURL / Mailing Lists / curl-library / Single Mail

curl-library

Access is denied.

From: lostsandman <lostsandman_at_gmail.com>
Date: Wed, 28 Sep 2005 11:18:00 +0100

Hello i am using libcurl library to download files from ftp server.
 My program works in that i can connect and download files from many
different servers.
 Recently i need to get files form a new server but it has odd permission
issue.
 i need to get files from the following folder
 ftp2.xx.org/Uploads/Private/XXFinancial<http://ftp2.xx.org/Uploads/Private/XXFinancial>
 but i don't have access the folders Uploads or Private so i need to go
stright into ftp2.xx.org/Uploads/Private/XXFinancial<http://ftp2.xx.org/Uploads/Private/XXFinancial>
 But when ever i do that i am getting Access is denied. as error message.
The password and user name is right since i can get SmartFTP etc to work.
 Note i can connect to ftp2.xx.org <http://ftp2.xx.org> on it own eg no
folders given.
 I server is running Microsoft FTP Service (Version 5.0).
  Here is smple code i am using

const std::string url = GetUrl(); //
ftp://ftp2.xx.org/Uploads/Private/XXFinancial

THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_URL,
url.c_str()));
THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_USERPWD,
m_usernamePassword.c_str()));

THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_NOPROGRESS,
1));
THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_NOBODY, 1));
THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl,
CURLOPT_WRITEFUNCTION, CallbackFunction));

if (!m_useEpsv)
ACTIV_THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl,
CURLOPT_FTP_USE_EPSV, 0));

if (NULL != m_pCurlLogFileHandle)
{
HROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_STDERR ,
m_pCurlLogFileHandle));
THROW_RESULT_IF(CURLE_OK, !=, curl_easy_setopt(m_pCurl, CURLOPT_VERBOSE ,
1));
}

THROW_RESULT_IF(CURLE_OK, !=, curl_easy_perform(m_pCurl)); // i don't get
CURL_OK here

Many thanks
Received on 2005-09-28