bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Writing to a Read-Only directory


From: Tim Ruehsen
Subject: Re: [Bug-wget] Writing to a Read-Only directory
Date: Wed, 10 Feb 2016 15:33:54 +0100
User-agent: KMail/4.14.10 (Linux/4.3.0-1-amd64; KDE/4.14.14; x86_64; ; )

Hi Gisle,

thanks for reporting.

I fixed that issue in a tiny commit that I just pushed.

BTW, I remember we had this or a similar issue before... though I couldn't 
find it with a quick search.

Regards,

        Tim

On Wednesday 10 February 2016 14:48:40 Gisle Vanem wrote:
> Launching Wget from a Win-10 read-only directory [1] gives
> inconsistent error messages.
> E.g. wget http://www.watt-32.net/misc/ASMBSW.dll
> ...
> Length: 107008 (105K) [application/x-msdos-program]
> ASMBSW.dll: Permission denied
> 
> Cannot write to 'ASMBSW.dll' (No error).
> 
> ----------------
> 
> Seems the "Permission denied" is lost when Wget prints "Cannot write to ..."
> since the 'errno' from fopen() at http.c (line 2490):
>      logprintf (LOG_NOTQUIET, "%s: %s\n", hs->local_file, strerror (errno));
> 
> gets lost at http.c (line 3993):
>      logprintf (LOG_NOTQUIET, _("Cannot write to %s (%s).\n"),
>                 quote (hstat.local_file), strerror (errno));
> 
> Other cases could trigger the same inconsistent error message.
> So what can be done for such a case? Can we push and pop the 'errno'
> (for all protocols) somehow?
> 
> --------
> 
> [1] I tried this in a directory from my old Windows installation thinking it
> was safe to write to:
>     c:\Windows.old\WINDOWS\System32\DriverStore\FileRepository
> 
>   But no. It is owned by the SYSTEM user. And will remain so until
>   I run the 'cleanmgr' program.

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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