PDA

View Full Version : SLES11SP1 vsftp stor fail



jmroth
05-Apr-2012, 14:48
Hi,
I'm running SLES11SP1 with the latest vsftp (vsftpd-2.0.7-4.23.1.x86_64.rpm)

Why is this working?:



[pid 14204] [ftp] OK LOGIN: Client "172.16.16.102", anon password "anon@localhost"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "230 Login successful."
[pid 14206] [ftp] FTP command: Client "172.16.16.102", "OPTS UTF8 ON"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "200 Always in UTF8 mode."
[pid 14206] [ftp] FTP command: Client "172.16.16.102", "CWD /upload"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "250 Directory successfully changed."
[pid 14206] [ftp] FTP command: Client "172.16.16.102", "TYPE I"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "200 Switching to Binary mode."
[pid 14206] [ftp] FTP command: Client "172.16.16.102", "PASV"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "227 Entering Passive Mode (192,168,223,30,156,156)"
[pid 14206] [ftp] FTP command: Client "172.16.16.102", "STOR file"
[pid 14206] [ftp] FTP response: Client "172.16.16.102", "150 Ok to send data."
[pid 14206] [ftp] OK UPLOAD: Client "172.16.16.102", "/upload/file", 24 bytes, 4.96Kbyte/sec


And why is the following not working?:



[pid 14110] [ftp] OK LOGIN: Client "192.168.111.254", anon password "root@x"
[pid 14112] [ftp] FTP response: Client "192.168.111.254", "230 Login successful."
[pid 14112] [ftp] FTP command: Client "192.168.111.254", "TYPE I"
[pid 14112] [ftp] FTP response: Client "192.168.111.254", "200 Switching to Binary mode."
[pid 14112] [ftp] FTP command: Client "192.168.111.254", "REST 0"
[pid 14112] [ftp] FTP response: Client "192.168.111.254", "350 Restart position accepted (0)."
[pid 14112] [ftp] FTP command: Client "192.168.111.254", "PASV"
[pid 14112] [ftp] FTP response: Client "192.168.111.254", "227 Entering Passive Mode (192,168,223,30,157,254)"
[pid 14112] [ftp] FTP command: Client "192.168.111.254", "STOR upload/file"
[pid 14112] [ftp] FTP response: Client "192.168.111.254", "553 Could not create file."
[pid 14112] [ftp] FAIL UPLOAD: Client "192.168.111.254", "/upload/file", 0.00Kbyte/sec


Note: two anonymous connections onto the same server trying to store a file.

Is it the server's or the client's fault?

Thanks.

malcolmlewis
05-Apr-2012, 15:53
Hi,
I'm running SLES11SP1 with the latest vsftp
(vsftpd-2.0.7-4.23.1.x86_64.rpm)

Note: two anonymous connections onto the same server trying to store a
file.

Is it the server's or the client's fault?

Thanks.


Hi
Are you sure it's in the upload directory? On localhost it indicates
CWD/upload, but not from the second upload?

--
Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 3.0.13-0.27-default
up 20:57, 3 users, load average: 0.00, 0.03, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

jmroth
05-Apr-2012, 18:11
Hi
Are you sure it's in the upload directory?
Hmm, whut?

The file is supposed to go to the upload directory.
So is the client in error and the syntax "STOR dir/file" is not correct.
Or should the server support this and it does not for some reason?

jmroth
05-Apr-2012, 18:22
(The file is actually created but has zero size.)

jmroth
11-Apr-2012, 10:50
I now believe the problem was that anonymous users in vsftp cannot overwrite files.
The client is special and first tries to write an empty file to see whether it can write files at all and then only proceeds with actually transmitting the full file, which fails because it cannot be overwritten.
Now using pure-ftpd which can be reconfigured.