Re: No error on unwritable output file

Daniel Stenberg via curl-users <[email protected]>
Newsgroups gmane.comp.web.curl.general
Message-ID <[email protected]>
On Mon, 10 Jul 2023, Paul Gilmartin via curl-users wrote:

> Trying to inject an error for a test, I did chmod a-w of my --output
> file.  Curl exited with status 0.  I would have expected:
>    curl: (23) Failure writing output to destination

I could not reproduce with 7.88.1 nor current git master:

$ ls -l output
-r--r--r-- 1 dast dast 5 Jul  9 23:57 output
$ curl localhost -o output --no-progress-meter
Warning: Failed to open the file output: Permission denied
curl: (23) Failure writing output to destination
$ echo $?
23

-- 

  / daniel.haxx.se
  | Commercial curl support up to 24x7 is available!
  | Private help, bug fixes, support, ports, new features
  | https://curl.se/support.html
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.