Bug 479454 - FTP download of some files from vsftpd server fails with 550 error
FTP download of some files from vsftpd server fails with 550 error
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: vsftpd (Show other bugs)
3.9
i686 Linux
low Severity medium
: ---
: ---
Assigned To: Jiri Skala
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-09 13:19 EST by sedezurik
Modified: 2014-11-09 17:31 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-15 03:50:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description sedezurik 2009-01-09 13:19:34 EST
Description of problem:
Download of some files fails with 550 error due to last character in filename being replaced with an underscore in the open() system call from vsftpd

Version-Release number of selected component (if applicable):
vsftpd-1.2.1-3E.16

How reproducible:
When exists, the file cannot be downloaded from any FTP client -- tested with Windows XP FTP client, Solaris 9 FTP client, and Red Hat 3 FTP client.  The download is successful if using SFTP from OpenSSH.  Also, if using an interactive shell via an OpenSSH connection, then I am able to read and write to the same file.  If I rename the file so that the last character is replaced with an underscore, then the FTP is successful.  If I then change the name of the file back to the original name, then the download fails.

Steps to Reproduce:
1. I do not know how to induce the problem.
2.
3.
  
Actual results:
From strace of vsftpd session when the download fails of file named "httpd.combine.stateply.20081227":
4216  recv(0, "PORT 134,67,128,47,19,138\r\n", 4096, MSG_PEEK) = 27
4216  read(0, "PORT 134,67,128,47,19,138\r\n", 27) = 27
4216  write(0, "200 PORT command successful. Con"..., 51) = 51
4216  rt_sigaction(SIGALRM, {0xc8b390, ~[RTMIN], SA_RESTORER, 0x5be0d8}, NULL, 8
) = 0
4216  alarm(600)                        = 520
4216  recv(0, "RETR httpd.combine.stateply.2008"..., 4096, MSG_PEEK) = 38
4216  read(0, "RETR httpd.combine.stateply.2008"..., 38) = 38
4216  open("httpd.combine.stateply.2008122_", O_RDONLY|O_NONBLOCK|O_LARGEFILE) =
 -1 ENOENT (No such file or directory)
4216  write(0, "550 Failed to open file.\r\n", 26) = 26
4216  rt_sigaction(SIGALRM, {0xc8b390, ~[RTMIN], SA_RESTORER, 0x5be0d8}, NULL, 8
) = 0
4216  alarm(600)                        = 600
4216  recv(0,  <unfinished ...>


Expected results:
From strace of vsftpd session when download is successful of a different file named "httpd.combine.stateply.20081226":
4216  recv(0, "PORT 134,67,128,47,19,139\r\n", 4096, MSG_PEEK) = 27
4216  read(0, "PORT 134,67,128,47,19,139\r\n", 27) = 27
4216  write(0, "200 PORT command successful. Con"..., 51) = 51
4216  rt_sigaction(SIGALRM, {0xc8b390, ~[RTMIN], SA_RESTORER, 0x5be0d8}, NULL, 8
) = 0
4216  alarm(600)                        = 412
4216  recv(0, "RETR httpd.combine.stateply.2008"..., 4096, MSG_PEEK) = 38
4216  read(0, "RETR httpd.combine.stateply.2008"..., 38) = 38
4216  open("httpd.combine.stateply.20081226", O_RDONLY|O_NONBLOCK|O_LARGEFILE) =
 6
4216  fstat64(6, {st_mode=S_IFREG|0644, st_size=588214, ...}) = 0
4216  write(5, "\3", 1)                 = 1
4216  read(5, "\1", 1)                  = 1
4216  recvmsg(5, {msg_name(0)=NULL, msg_iov(1)=[{"\0", 1}], msg_controllen=16, {
cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {7}}, msg_flags=0}, 0)
 = 1
...

Additional info:
If I make a copy of the file with a different name, then I am able to download the copy via FTP.
Comment 1 Radek Vokal 2009-01-15 03:50:48 EST
Since Red Hat Enterprise Linux 3 is in its maintenance phase we are looking only at Security and Performance related bugs. If you think this bug is critical for you, please talk to our support organization www.redhat.com/support

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