delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/03/23/16:29:02

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=1.7 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_46,SPF_PASS,URI_BLOGSPOT,WEIRD_PORT
X-Spam-Check-By: sourceware.org
From: Barry Kelly <bkelly DOT ie AT gmail DOT com>
To: Cygwin Mailing List <cygwin AT cygwin DOT com>
Subject: wget -k downloading to shares fails with seemingly spurious "permission denied" error
Date: Mon, 23 Mar 2009 21:28:45 +0000
Message-ID: <47vfs4dac6vvqa6f4mfivec8eaouv7uh5q@4ax.com>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

I'm having a problem that doesn't seem to admit logical explanation,
apart from a bug in either wget, Cygwin or Windows' implementation of
SMB shares.

Assume the current directory is a UNC path to a share on another machine
(say, //foo/blah), with full permissions. Run the following command from
Cygwin bash:

$ wget -k google.com

This should download an index.html, then convert any relative links in
the html to absolute links. However, when I run it, I get output that
looks more like this:

$ wget -k google.com
# ...
Length: unspecified [text/html]
Saving to: `index.html'

     0K                                                       58.3K=3D0.1s

2009-03-23 21:21:38 (58.3 KB/s) - `index.html' saved [6528]

Converting index.html... Unable to delete `index.html': Permission
denied
Converted 1 files in 0.02 seconds.

I've done an strace:

   67 1028672 [main] wget 2016 unlink: _unlink (\\foo\blah\baz)
 3815 1032487 [main] wget 2016 seterrno_from_win_error:
/ext/build/netrel/src/cygwin-1.5.25-15/winsup/cygwin/syscalls.cc:269
windows error 5
  110 1032597 [main] wget 2016 geterrno_from_win_error: windows error 5
=3D=3D errno 13
   80 1032677 [main] wget 2016 __set_errno: void
seterrno_from_win_error(const char*, int, DWORD):310 val 13
   80 1032757 [main] wget 2016 unlink: -1 =3D unlink (baz)
  245 1033002 [main] wget 2016 sig_send: sendsig 0x150, pid 2016, signal
-34, its_me 1
   88 1033090 [main] wget 2016 sig_send: wakeup 0x24C
   81 1033171 [main] wget 2016 sig_send: Waiting for pack.wakeup 0x24C
    4 1033175 [sig] wget 2016 wait_sig: signalling pack.wakeup 0x24C
   98 1033273 [main] wget 2016 sig_send: returning 0x0 from sending
signal -34
   84 1033357 [main] wget 2016 fhandler_base::write: binary write
Unable to delete `  100 1033457 [main] wget 2016 sig_send: sendsig
0x150, pid 2016, signal -34, its_me 1

I can delete the downloaded files just fine using `unlink', and its
unlink call appears unmolested:

   28   33813 [main] unlink 2684 unlink: _unlink (\\foo\blah\baz)
 1347   35160 [main] unlink 2684 unlink: DeleteFile after
CreateFile/CloseHandle succeeded
   47   35207 [main] unlink 2684 unlink: 0 =3D unlink (baz)
  176   35383 [main] unlink 2684 close: close (1)


Can anyone else verify the problem? Can anything be done to fix it?

-- Barry

--=20
http://barrkel.blogspot.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019