Bug 4725 - wget should not chmod mirrored symlinks to 0777
Summary: wget should not chmod mirrored symlinks to 0777
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: wget
Version: 6.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: David Lawrence
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-08-26 18:25 UTC by charles
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-08-26 20:32:22 UTC

Attachments (Terms of Use)

Description charles 1999-08-26 18:25:06 UTC
Assume the maintainer of an anonymous ftp site is malicious
toward someone who uses wget to mirror his site.  He could
put in simlinks such as

	a -> ..
	b -> ../..
	c -> ../../..
	d -> ../../../..
	s -> /bin/sh

Those will all be listed as having 0777 perms since all
simlinks do.  If wget --mirror, for example, is used to
mirror this ftp site and the wget user is not aware of
the presence of those links (among a bunch of others files),
wget will do ``chmod 0777 l'' on the copy of link l thereby
effectively changing the permission of the pointed-to file,
if the wget user has the right to do so.  This could then be
used by a local user of the system running wget.

I will send a patch for this which I submitted to
bug-wget without receving an answer for 2 months.

Comment 1 Jeff Johnson 1999-08-26 20:32:59 UTC
Fixed in wget-1.5.3-5. Thanks for the patch.

Note You need to log in before you can comment on or make changes to this bug.