cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker mailing list Archives

[ curl-Bugs-1600668 ] Download permissions problem.

From: SourceForge.net <noreply_at_sourceforge.net>
Date: Tue, 21 Nov 2006 12:41:17 -0800

Bugs item #1600668, was opened at 2006-11-21 11:49
Message generated for change (Comment added) made by dfandrich
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1600668&group_id=976

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: ftp
Group: wrong behaviour
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Alan Pinstein (apinstein)
Assigned to: Daniel Stenberg (bagder)
Summary: Download permissions problem.

Initial Comment:
Detailed Summary: CURL can't fetch a file unless it has permissions for *all* folders leading up to a file. This prevents the use of curl to download files that you have permissions to be downloaded.

I ran into a wierd problem... I was able to dl an ftp file with wget, but not curl. Further investigation showed that curl tries to "get to the file" differently from wget.

Suppose you access an ftp server with a file at /noperm/perm/thefile.zip.

You *can* log in, cd /noperm/perm, then get thefile.zip. However, curl cd's one dir at a time. And since you are not allowed in /noperm, the download fails.

Here's some tcpflow sniffs to illustrate trying to get:

ftp://idx.living.net/idx_fl_ftp_down/idx_miamidade_dn/miamidade_photo.zip

(you don't have permission to try this, but I posted the URL so that the tcpflows make sense)

-- curl, download failed --
065.117.180.017.00021-010.000.001.104.62958: 230 Login OK. Proceed.

010.000.001.104.62958-065.117.180.017.00021: PWD

065.117.180.017.00021-010.000.001.104.62958: 257 "/" is current folder.

010.000.001.104.62958-065.117.180.017.00021: CWD idx_fl_ftp_down

065.117.180.017.00021-010.000.001.104.62958: 550 Permission denied.

010.000.001.104.62958-065.117.180.017.00021: QUIT

065.117.180.017.00021-010.000.001.104.62958: 221 Exit message.

-- by-hand ftp, success --
065.117.180.017.00021-010.000.001.104.62963: 230 Login OK. Proceed.

010.000.001.104.62963-065.117.180.017.00021: SYST

065.117.180.017.00021-010.000.001.104.62963: 215 UNIX Type: L8

010.000.001.104.62963-065.117.180.017.00021: FEAT

065.117.180.017.00021-010.000.001.104.62963: 211-Features supported:
 COMB target;source_list
 REST STREAM
 SIZE
 MDTM
 XCRC filename;start;end
 SSCN
 MLST Size*;Modify*;Create;Type*;Unique;Perm*;Lang;Media-Type;CharSet;
 MODE Z
211 END

010.000.001.104.62963-065.117.180.017.00021: PWD

065.117.180.017.00021-010.000.001.104.62963: 257 "/" is current folder.

010.000.001.104.62963-065.117.180.017.00021: CWD idx_fl_ftp_down

065.117.180.017.00021-010.000.001.104.62963: 550 Permission denied.

010.000.001.104.62963-065.117.180.017.00021: CWD idx_fl_ftp_down/idx_miamidade_dn

065.117.180.017.00021-010.000.001.104.62963: 250 Folder changed to "/idx_fl_ftp_down/idx_miamidade_dn".

010.000.001.104.62963-065.117.180.017.00021: PWD

065.117.180.017.00021-010.000.001.104.62963: 257 "/idx_fl_ftp_down/idx_miamidade_dn" is current folder.

010.000.001.104.62963-065.117.180.017.00021: QUIT

065.117.180.017.00021-010.000.001.104.62963: 221 Exit message.

----------------------------------------------------------------------

>Comment By: Dan Fandrich (dfandrich)
Date: 2006-11-21 12:41

Message:
Logged In: YES
user_id=236775
Originator: NO

This is a server problem, not a curl problem--curl is RFC compliant in its
accessing of ftp resources. Recent versions of curl support the
--ftp-method option which can be used to force curl to issue CWD commands
in an RFC-incompliant manner and make it act like wget in this regard.

----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=1600668&group_id=976
Received on 2006-11-21

These mail archives are generated by hypermail.

donate! Page updated November 12, 2010.
web site info

File upload with ASP.NET