Bug 10080
Summary: | Doesn't CD home before giving path | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | whitis |
Component: | ncftp | Assignee: | Bernhard Rosenkraenzer <bero> |
Status: | CLOSED NOTABUG | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 6.2 | CC: | mgleason |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2000-03-27 12:00:01 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
whitis
2000-03-09 06:10:38 UTC
This is not a bug. RFC 1738 states that URLs use relative paths from the start directory. Furthermore, the "/" characters in the URL are to be interpreted solely as node delimiters and not as characters in a pathname. Therefore your URL ftp://ftp.redhat.com/pub/redhat-6.2beta/SRPMS/SRPMS/pine-4.21-3.src.rpm translates into: Connect and login to ftp.redhat.com. cd "pub" cd "redhat-6.2beta" cd "SRPMS" cd "SRPMS" get "pine-4.21-3.src.rpm" Note that it does NOT translate into: cd "/pub" cd "redhat-6.2beta" cd "SRPMS" cd "SRPMS" get "pine-4.21-3.src.rpm" nor: Connect and login to ftp.redhat.com. cd "/pub/redhat-6.2beta/SRPMS/SRPMS" get "pine-4.21-3.src.rpm" That is why URLs involving a user login, i.e. ftp://joeuser@ftp.example.com/public_html/index.html, work since they work relative from the start directory (and in this case user logins start from the user's home directory). Otherwise, URLs would have to use the absolute path to the home directory, which is undesirable. Therefore, if you need to start from the root directory, you need to have your URL explicitly quote the root directory, such as: ftp://ftp.redhat.com/%2Fpub/redhat-6.2beta/SRPMS/SRPMS/pine-4.21-3.src.rpm The "%2F" is the "/" character, so that changes the first node in the URL to be "/pub" rather than "pub". Of course, it's really best to not use this and instead use URLs relative to the start directory. Mike Gleason Mike is correct here; the situation is identical with other tools like wget. |