bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] Recursive wget: change in handling of file permissions?


From: Micah Cowan
Subject: Re: [Bug-wget] Recursive wget: change in handling of file permissions?
Date: Mon, 03 Oct 2011 15:48:49 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Thunderbird/3.1.15

On 09/30/2011 08:13 AM, Steven M. Schweda wrote:
>     I'm just a bystander here, but, so far as I can see, there's a
> relatively unconditional chmod() in "src/ftp.c", and has been since
> around version 1.10.2.  (My Wget 1.10.2 on VMS tries to preserve the
> original permissions, for example, just as the latest stuff does.)

...

>     Poking around through the scrap heap here, I can find traces of old
> options like "--preserve-permissions" or "--preservepermissions" (and
> variables like "opt.preserve_perm"), but all the 1.10.2-and-newer stuff
> I've found does the chmod() whenever it has the necessary info (so, for
> practically any recursive FTP download).  Unless someone modified your
> 1.10.2 program, or there's some exotic file-ownership/permissions quirk
> involved, I can't explain why _your_ 1.10.2 program _fails_ to set the
> original permissions just as the newer program does.

Actually, the 1.10.2 sources from ftp.gnu.org seem to have the
conditional-on-"--preserve-permissions" chmod, so I wonder how that got
lost from your VMS sources (note, I didn't actually test behavior, just
saw that the only chmod present in src/ftp.c in 1.10.2 is in the body of
an "if (opt.preserve_perm)").

Since 1.10.2 was the last of the 1.10 series, the next would be 1.11,
which was the first of my releases; it too seems to have the conditional
chmod (wonder why your sources disagree with GNU's?). Wget 1.12 (another
of mine) has it unconditional again, and a comment above it suggests we
might have gotten it from your VMS sources.

As I recall, you submitted substantial rewrites to ftp.c for 1.12
(mostly _very_ helpful code improvements, in addition to better VMS
support of course). I tried to make sure that any behavioral changes
were not regressions, but looks like I missed this one. We obviously
must not have had it covered in the regression tests yet.

--preserve-permissions is currently annotated with "deprecated" in
main.c; but I think this is because I looked through the code, saw that
--preserve-permissions wasn't used, and wasn't documented in the info or
man pages, and so I figured it was an unimplemented experimental option
(FTP-specific functionality was always the area I was least
knowledgeable about with wget). It had been documented in the --help
output, though.

So, from where I'm sitting, it looks like --preserve-permissions was an
implemented feature for two major releases (1.10 and 1.11 series), and
has now been missing from the last two major releases (1.12 and 1.13).
Probably, it should be reinstated, and documentation added, to restore
previous behavior.

Giuseppe?

-- 
Micah J. Cowan
http://micah.cowan.name/



reply via email to

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