Add a New Comment (Rich Markup)
It's clearly a bug. If we are downloading README to local file foo, there's no reason to remove the local symlink README. When we want to save into a name where there's currently a symlink, consistency with shell > would dictate just to follow the link on writing, but as that may lead to security issues, replacing with a file may also be acceptable.
Use -d to get Unlinking README (symlink). In ftp.c you will find those lines: /* Remove it if it's a link. */ remove_link (con->target); This is done by purpose (I just can guess why: not to overwrite the content the link points to). The question is: is it a bug or a feature ? Should we just document this behaviour (maybe it already is).
slightly related bug.. $ ln -s /etc/passwd README $ wget -O README http://foo.bar README: Permission denied
Hello, a forwarded bug report which is reproducible: https://bugs.debian.org/784348 --8<-- joey@darkstar:~/tmp/y>ln -s /etc/passwd README joey@darkstar:~/tmp/y>ls README@ joey@darkstar:~/tmp/y>wget -O foo ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README --2015-05-05 13:17:22-- ftp://ftp.funet.fi/pub/Linux/mirrors/debian/README => ‘foo’ Resolving ftp.funet.fi (ftp.funet.fi)... 193.166.3.2, 2001:708:10:9::20:2 Connecting to ftp.funet.fi (ftp.funet.fi)|193.166.3.2|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD (1) /pub/Linux/mirrors/debian ... done. ==> SIZE README ... 1495 ==> PASV ... done. ==> RETR README ... done. Length: 1495 (1.5K) (unauthoritative) README 100%[=====================>] 1.46K 5.45KB/s in 0.3s 2015-05-05 13:17:28 (5.45 KB/s) - ‘foo’ saved [1495] joey@darkstar:~/tmp/y>ls foo Doesn't happen if README is a file rather than a symlink, doesn't happen when using http. The ftp downloader apparently has a bug.. --8<--
(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)
Attach Files: Comment:
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
Please enter the title of George Orwell's famous dystopian book (it's a date):
Follow 2 latest changes.
Copyright © 2023 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. The Levitating, Meditating, Flute-playing Gnu logo is a GNU GPL'ed image provided by the Nevrax Design Team. Source Code
Powered by Savane 3.11