cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Access is denied.

From: Andy Hobbs <andy_at_hobbs.uk.net>
Date: Wed, 28 Sep 2005 11:25:48 +0100

Hi,

 

I'm not sure about windows but on unix you have to have access to each
directory (folder) in the path you are requesting in order access the object
(file/other directory). The point being to restrict user access you set
permissions on the directory and can leave the individual file permissions
alone.

 

Hope this helps

 

Andy

 

  _____

From: curl-library-bounces_at_cool.haxx.se
[mailto:curl-library-bounces_at_cool.haxx.se] On Behalf Of lostsandman
Sent: 28 September 2005 11:18
To: curl-library_at_cool.haxx.se
Subject: Access is denied.

 

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

 

but i don't have access the folders Uploads or Private so i need to go
stright into 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 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