bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wget claims "Success" when it failed to write to local directory


From: Michael D. Setzer II
Subject: Re: wget claims "Success" when it failed to write to local directory
Date: Sun, 22 Oct 2023 04:23:54 +1000

On 21 Oct 2023 at 17:16, Christian Rosentreter wrote:

From:                   Christian Rosentreter <karibu@gmx.net>
Subject:                wget claims "Success" when it failed to write to
local directory
Date sent:              Sat, 21 Oct 2023 17:16:44 +0200
To:                     bug-wget@gnu.org

>
> 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:
>

I'm a user of wget2 but in looking at man pages reports that error
code 3 is a File I/O error?

Exit Status
       Wget2 may return one of several error codes if it encounters
problems.

                0   No problems occurred.
                1   Generic error code.
                2   Parse error. For instance, when parsing
command-line options, the .wget2rc or .netrc...
                3   File I/O error.

So, would agree the Success is probable an incorrect message, but
since error code did report that there was a File I/O error the wget
program worked successfully.


>
> ### 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…
>
>
>
>
>


+------------------------------------------------------------+
 Michael D. Setzer II - Computer Science Instructor (Retired)
 mailto:mikes@guam.net
 mailto:msetzerii@gmail.com
 Guam - Where America's Day Begins
 G4L Disk Imaging Project maintainer
 http://sourceforge.net/projects/g4l/
+------------------------------------------------------------+






reply via email to

[Prev in Thread] Current Thread [Next in Thread]