LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ftp to /dev/null fails with 500 OOPS: ftruncate (https://www.linuxquestions.org/questions/linux-server-73/ftp-to-dev-null-fails-with-500-oops-ftruncate-4175535108/)

Sivam 02-25-2015 08:02 PM

Ftp to /dev/null fails with 500 OOPS: ftruncate
 
While trying to do ftp to /dev/null of remote server, it fails with the below error. Any suggestions what could be going wrong. The same thing to a different server works. So I am assuming some config on the server that needs to be changed. Compared the config from both machines and they look the same. Not able to figure out if any other dependency for this to work. As shown below normal PUT works bur PUT to /dev/null fails.

[root@hst02 ~]# ftp x.x.x.x
Connected to x.x.x.x.
220 (vsFTPd 3.0.2)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (x.x.x.x:root): root
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put 5MB
local: 5MB remote: 5MB
227 Entering Passive Mode (10,199,73,32,142,229).
150 Ok to send data.
226 Transfer complete.
ftp> put 5MB /dev/null
local: 5MB remote: /dev/null
227 Entering Passive Mode (10,199,73,32,230,9).
500 OOPS: ftruncate
ftp>

p_s_shah 02-26-2015 02:31 PM

Can you please let us know what is the purpose here? Why do you want to put to /dev/null?

Sivam 02-26-2015 03:09 PM

Put to /dev/null helps measure throughput in better way and ignores the disk i/o limitation

smallpond 02-26-2015 03:22 PM

/dev/null is a char device, not a file, so does not support ftruncate. FTP does file transfer.

Sivam 02-26-2015 03:57 PM

@smallpond: If I point to a different server with ftp put to /dev/null it works, and I have seen quite a few examples on web where people use ftp to /dev/null and I have been using it quite often. Unable to get it to work with this server.

brossob 02-12-2019 10:11 AM

try and use append instead of put, this is a known bug

MadeInGermany 02-12-2019 10:33 PM

Is the bug in the kernel? IMHO the /dev/null device driver should allow a truncate.


All times are GMT -5. The time now is 11:38 PM.