[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] Recursive wget: change in handling of file permissions?
From: |
Steven M. Schweda |
Subject: |
Re: [Bug-wget] Recursive wget: change in handling of file permissions? |
Date: |
Mon, 3 Oct 2011 19:24:33 -0500 (CDT) |
From: Micah Cowan <address@hidden>
> On 09/30/2011 08:13 AM, Steven M. Schweda wrote:
> > I'm just a bystander here, [...]
Well, I _thought_ that I was innocent, but what do I know?
> 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)").
Hmmm. There seems to have been a bunch of code thrashing back then,
and I may have plopped some older VMS-tolerant ftp.c onto a newer ftp.c,
and wiped out a new feature in the process. My 1.10.2 ftp.c_orig does
seem to have this:
if (f->perms && f->type == FT_PLAINFILE && dlthis)
{
if (opt.preserve_perm)
chmod (con->target, f->perms);
}
else
DEBUGP (("Unrecognized permissions for %s.\n", con->target));
while my "improved" edition lacks the "opt.preserve_perm" test:
if (dlthis && (actual_target != NULL) && (f->type == FT_PLAINFILE))
{
if (f->perms)
chmod (actual_target, f->perms);
else
DEBUGP (("Unrecognized permissions for %s.\n", actual_target));
Oops.
> 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.
Yup. Mostly.
> --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.
I was just removing it in the VMS help file, for consistency. (That
should be easy to restore.)
> 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.
Makes sense to me. It'd probably be good if someone with a fresh
brain went through that file again, and looked for any other damage for
which I might be (partially or entirely) responsible.
Trust no one, I always say. Especially me. (I hate it when I start
thinking "Who's the moron ...", and then get the reflexive answer.)
------------------------------------------------------------------------
Steven M. Schweda address@hidden
382 South Warwick Street (+1) 651-699-9818
Saint Paul MN 55105-2547