Hello Tim,
thanks for your reply. Yes, I'm running the latest version (running on a rusty OS X "Yosemite"), also see the text you quoted at the bottom (unless there are silent updates w/o version bump?). My copy was build on July 25, 2023. Pretty up-to-date by my standards. :-) All used dependencies are also pretty recent (maybe a day or 2 days older than wget, most was build for wget). Full output of `wget --version`, see below at the end of my reply. I only applied this required single-line patch from the bug tracker to fix FTPS crashes for one of my use cases: https://savannah.gnu.org/bugs/?62137 I don't see how this should break other things however. I always get "(Success)" here, never "(Permission denied)". I tried `chown root`, or just `chmod -w`, etc., as soon wget has no permissions it will still report "(Success)". I also tried with `--no-config` just in case (I only have "local-encoding = UTF-8" in there), same result. I tested an older wget (1.20.1) on my Raspberry PI under whatever Linux it runs ("Raspbian GNU/Linux 10 (buster)" according to "/etc/os-release") and it works as you describe and reports "Permission denied" in this case. But I also build the latest 1.21.4 version and it fails with "(Success)" under my Linux too: $ mkdir ~/Desktop/wget_tmp $ cd ~/Desktop/wget_tmp/ $ wget https://ftp.gnu.org/gnu/wget/wget-1.21.4.tar.gz $ tar -xvzf wget-1.21.4.tar.gz $ cd wget-1.21.4/ $ ./configure --with-ssl=openssl # GnuTLS not available $ make $ mkdir ~/Desktop/foobar $ cd ~/Desktop/foobar $ chmod -w . $ ../wget_tmp/wget-1.21.4/src/wget https://www.christianrosentreter.com/ --2023-10-21 20:53:19-- https://www.christianrosentreter.com/ Resolving www.christianrosentreter.com... 85.13.142.16 Connecting to www.christianrosentreter.com|85.13.142.16|:443... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] index.html: Permission denied Cannot write to ‘index.html’ (Success). $ ../wget_tmp/wget-1.21.4/src/wget --version GNU Wget 1.21.4 built on linux-gnueabihf. -cares +digest -gpgme +https +ipv6 -iri +large-file -metalink +nls +ntlm +opie -psl +ssl/openssl Wgetrc: /usr/local/etc/wgetrc (system) Locale: /usr/local/share/locale Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wgetrc" -DLOCALEDIR="/usr/local/share/locale" -I. -I../lib -I../lib -DHAVE_LIBSSL -DNDEBUG -g -O2 Link: gcc -DHAVE_LIBSSL -DNDEBUG -g -O2 -lssl -lcrypto -lz ../lib/libgnu.a Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Originally written by Hrvoje Niksic <[email protected]>. Please send bug reports and questions to <[email protected]>. I'm happy to investigate further, but I would need a direction where I should look at. I'm not familiar with wget from a development/ code perspective. Basically I'm just a wget user that's already happy when it builds w/o major hassle and works w/o crashing afterwards. :-) Here's the full uncut output of `wget --version` on my OS X machine: $ wget --version GNU Wget 1.21.4 built on darwin14.5.0. +cares +digest -gpgme +https +ipv6 +iri +large-file +metalink -nls +ntlm +opie +psl +ssl/openssl Wgetrc: /usr/local/etc/wget/wgetrc (system) Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/usr/local/etc/wget/wgetrc" -DLOCALEDIR="/usr/local/silo/wget/1.21.4/share/locale" -I. -I../lib -I../lib -I/usr/local/silo/libiconv/latest/include -I/usr/local/silo/libunistring/latest/include -I/usr/local/silo/libmetalink/latest/include -I/usr/local/silo/c-ares/latest/include -I/usr/local/silo/pcre2/latest/include -I/usr/local/silo/uuid-ossp/latest/include -I/usr/local/silo/libidn2/latest/include -I/usr/local/silo/openssl/latest@3/include -DHAVE_LIBSSL -I/usr/local/silo/zlib/latest/include -I/usr/local/silo/libpsl/latest/include -DNDEBUG -g -O2 Link: gcc -I/usr/local/silo/libmetalink/latest/include -I/usr/local/silo/c-ares/latest/include -I/usr/local/silo/pcre2/latest/include -I/usr/local/silo/uuid-ossp/latest/include -I/usr/local/silo/libidn2/latest/include -I/usr/local/silo/openssl/latest@3/include -DHAVE_LIBSSL -I/usr/local/silo/zlib/latest/include -I/usr/local/silo/libpsl/latest/include -DNDEBUG -g -O2 -L/usr/local/silo/libiconv/latest/lib -L/usr/local/silo/libunistring/latest/lib -L/usr/local/silo/libmetalink/latest/lib -lmetalink -L/usr/local/silo/c-ares/latest/lib -lcares -L/usr/local/silo/pcre2/latest/lib -lpcre2-8 -L/usr/local/silo/uuid-ossp/latest/lib -luuid -L/usr/local/silo/libidn2/latest/lib -lidn2 -L/usr/local/silo/openssl/latest@3/lib -lssl -lcrypto -L/usr/local/silo/zlib/latest/lib -lz -L/usr/local/silo/libpsl/latest/lib -lpsl -liconv -lunistring ../lib/libgnu.a -lunistring -liconv Copyright (C) 2015 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://www.gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Originally written by Hrvoje Niksic <[email protected]>. Please send bug reports and questions to <[email protected]>. > On 21 Oct 2023, at 7:22 PM, Tim Rühsen <[email protected]> wrote: > > Hi, > > do you run the latest wget (1.21.4)? > > With that version, you get a > > Cannot write to 'index.html' (Permission denied). > > Regards, Tim > > On 10/21/23 17:16, Christian Rosentreter wrote: >> Hi there, >> There's a minor cosmetic bug in wget 1.x where it claims "Success" when it >> in fact entirely failed to write to the local >> disk, e.g. because of missing permissions/ write access to the current >> directory. The return code is "3" however, so it's >> basically only the message that it prints on screen that is funny in a >> suspicious way: >> ### Prepare situation… >> $ mkdir foobar >> $ chmod -w foobar # remove write access >> $ cd foobar >> ### Note: the "Permission denied" and "Cannot write to" messages, but we >> ### get a "(Success)" anyway: >> $ wget https://www.christianrosentreter.com/ >> --2023-10-21 17:05:35-- https://www.christianrosentreter.com/ >> Resolving www.christianrosentreter.com (www.christianrosentreter.com)... >> 85.13.142.16 >> Connecting to www.christianrosentreter.com >> (www.christianrosentreter.com)|85.13.142.16|:443... connected. >> HTTP request sent, awaiting response... 200 OK >> Length: unspecified [text/html] >> index.html: Permission denied >> Cannot write to 'index.html' (Success). >> ### The return code seems to be reasonable though: >> $ echo $? >> 3 >> ### Version tested: >> $ wget --version >> GNU Wget 1.21.4 built on darwin14.5.0. >> +cares +digest -gpgme +https +ipv6 +iri +large-file +metalink -nls >> +ntlm +opie +psl +ssl/openssl >> …cut…
