Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Nov 2004 11:06:26 GMT
From:      Michael Szklarski <dysoft@kco.com.pl>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   misc/73411: [patch] FTPD could set attributes to 0600 while uploading; after upload is complete it could set attributes to 0644
Message-ID:  <200411021106.iA2B6Qro076417@www.freebsd.org>
Resent-Message-ID: <200411021110.iA2BAS6Y096480@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         73411
>Category:       misc
>Synopsis:       [patch] FTPD could set attributes to 0600 while uploading; after upload is complete it could set attributes to 0644
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Nov 02 11:10:27 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Michael Szklarski
>Release:        FreeBSD 5.3 BETA 7
>Organization:
FILBICO
>Environment:
>Description:
While uploading large files, it is possible to RETR an incomplete file.
FTPD opens files for writing with 0644 attributes using fopen (look into ftpd.c:store function); it is easy to change its behaviour to open these files in 0600 mode using open() and after upload is done (or broken) to fchmod the file into 0644.
>How-To-Repeat:
Run ftpd, then upload a large file (abt 100MB should do on 10MBIT LAN)
and simultaneously try to get it.
>Fix:
I have modified a little ftpd.c file (functions store(), guniquefd(), receive_data() ); please e-mail me at dysoft@kco.com.pl if anyone is interested.

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200411021106.iA2B6Qro076417>