553 file couldn't be created

crio-user@nh10-iitbbs-ac:~/ftp_client$ ftp 0.0.0.0 8081
Connected to 0.0.0.0.
220 (vsFTPd 3.0.3)
Name (0.0.0.0:crio-user):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /home/crio-user/ftp_server
250 Directory successfully changed.
ftp> lcd /home/crio-user/ftp_client
Local directory now /home/crio-user/ftp_client
ftp> put file1.txt home/crio-user/ftp_server/f1.txt
local: file1.txt remote: home/crio-user/ftp_server/f1.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.

what’s wrong?

You are already setting your remote directory to /home/crio-user/ftp _server then use only filename with put command. You are writing wrong syntax for put. Please check how to use put command online

crio-user@nh10-iitbbs-ac:~/ftp_client$ ftp 0.0.0.0 8081
Connected to 0.0.0.0.
220 (vsFTPd 3.0.3)
Name (0.0.0.0:crio-user):
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
ftp> put file1.txt home/crio-user/ftp_server/f1.txt
local: file1.txt remote: home/crio-user/ftp_server/f1.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.

even without setting the directory before i get same error.

@harshithnarra

Hint: It’s a typo :slight_smile:

Understand these things:

The directory from which you start the ftp connection is your local directory. If you want to transfer a file present in that directory then no need to use lcd.

Cd is used to set the path for remote directory, i.e. , the directory in which you want to upload the file . So you need to change directory of remote inside ftp using cd.

And then you can simply use put filename (in this case put file1.txt) because already source and destination path are set.

Try this step by step.

For example, if you want to transfer a file in a folder named qbox which is inside workspace then you will write cd /home/crio-user/workspace/qbox and then use:
put filename

I hope this helps.

thank you found it.
there needs to be a slash before home.

@harshithnarra
Yeah, it’s amazing that most of the time, we deal with the subtle bugs like this.
Please close the thread, Happy Learning!

i tried changing directory to ftp_server then i used put command it is still stating the same error

Please confirm that crio-user have permission to write to the folder before you upload. For a quick peek on the related ftp commands, this could be useful