2
While making an automated ftp upload script, I noticed a very strange behaviour of ftp
program: if I want to send a file which belongs to /tmp
directory, ftp
will always fail and give an error message: cannot create file
.
See this:
^_^ ~ > touch /tmp/file1
^_^ ~ > touch file2
^_^ ~ > ftp <server>
Connected to <server> (<server ip>).
220 (vsFTPd 2.2.2)
Name (<server:username>): <username>
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> put /tmp/file1
local: /tmp/file1 remote: /tmp/file1
227 Entering Passive Mode (<ip>).
553 Could not create file.
ftp> put file2
local: file2 remote: file2
227 Entering Passive Mode (<ip>).
150 Ok to send data.
226 Transfer complete.
ftp>
What is wrong with ftp
reading a file from /tmp
?
There is no SELinux or AppArmor on the server nor on the ftp
client.
Does the
/tmp
directory exist on theftp
server and do you have access to it? Can youcd
into both the remote and local/tmp
directories andput file1
? – Nicole Hamilton – 2013-02-21T00:24:59.377