LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ftp error "553 Could not create file." (https://www.linuxquestions.org/questions/linux-newbie-8/ftp-error-553-could-not-create-file-4175446865/)

alieblice 01-23-2013 04:59 AM

ftp error "553 Could not create file."
 
Hi
i got problem with my ftp server(vsftpd). when i use `mput` or `put` command if i don't specify file name to be save i get this error "553 Could not create file." .
i mean it doesn't use original file name automatically to save file on remote system.

I did some search and find ntrans and nmap in man page of ftp command (i use ubuntu 12.04). but using them didn't work .maybe i use them in wrong way.


Code:

ftp> put /home/aliali/Desktop/FTP/2.jpg
local: /home/aliali/Desktop/FTP/2.jpg remote: /home/aliali/Desktop/FTP/2.jpg
227 Entering Passive Mode (172,16,134,131,24,92).
553 Could not create file.
ftp>


ButterflyMelissa 01-23-2013 11:00 AM

You may not have write permissions (as this user or otherwise) on the remote system...

Either change the ownership of the folder or change the permissions....
If it is your account in the remote system, and you made the destination folder as someone else (Root for example) there may not be any write permissions for the proper user (you...)

By the way, it's poor practice (IMHO) to write from and/or to a desktop folder...

Thor

alieblice 01-24-2013 01:05 AM

thanks for reply.

I have write permission. i can upload by filezilla without any problem and if i give it a name it could save the file but when i don't give it a name it cant save file.
problem is that it's not using original file name to save the file.

jpollard 01-24-2013 07:09 AM

It is possible that the file already exists, and won't overwrite it.

alieblice 01-24-2013 07:53 AM

no the file doesn't exist.
i will re install it to see what happen . with new fresh config file.

alieblice 01-25-2013 10:14 AM

Hi every body

I installed vsftp on different system and this problem exist yet . so now I'm sure that theres something wrong with ftp command.

ButterflyMelissa 01-25-2013 10:52 AM

Quote:

I installed vsftp on different system and this problem exist yet . so now I'm sure that theres something wrong with ftp command.
Okay, that's usefull info. Let's have a look at the config file, shall we? Did you chroot the user (trap the user in his/her own folder)? There is a user made on the local server, I assume? If that user needs to get "out" of that folder, "bind" the destination like so:

Quote:

cd /home/user
mkdir somefolder
mount –bind /var/www/html/webfiles somefolder
Using a simlink to a folder does'nt work with VSFTPD, you'll have to use the method above...

Following this with heightened interest...

Thor

alieblice 01-25-2013 01:09 PM

sorry every body. it's looks like that it was my mistake in using command but i got strange behavior in command addressing .

see this output :

Code:

ftp> pwd
257 "/home/alieblice/ftp"
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp> !
aliali@lp:~/Desktop/FTP$ ls
123  2.jpg  robat  test.avi
aliali@lp:~/Desktop/FTP$ exit
exit
ftp> put robat
local: robat remote: robat
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
10344320 bytes sent in 0.16 secs (63354.1 kB/s)
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
-rw-------    1 1000    1000    10344320 Jan 25 09:13 robat
226 Directory send OK.
ftp> delete robat
250 Delete operation successful.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp> put /home/aliali/Desktop/FTP/
123      2.jpg    robat    test.avi 
ftp> put /home/aliali/Desktop/FTP/robat
local: /home/aliali/Desktop/FTP/robat remote: /home/aliali/Desktop/FTP/robat
200 PORT command successful. Consider using PASV.
553 Could not create file.
ftp>


when i use this command to send a file it's successfully transfer :
Code:

ftp> put robat
local: robat remote: robat
200 PORT command successful. Consider using PASV.
150 Ok to send data.
226 Transfer complete.
10344320 bytes sent in 0.16 secs (63354.1 kB/s)

but when i use this command it fails :
Code:

ftp> put /home/aliali/Desktop/FTP/robat
local: /home/aliali/Desktop/FTP/robat remote: /home/aliali/Desktop/FTP/robat
200 PORT command successful. Consider using PASV.
553 Could not create file.

its simple user on system without any chroot and its local user not virtual or something .

ButterflyMelissa 01-26-2013 03:50 AM

Quote:

its simple user on system without any chroot and its local user not virtual or something
Thanks for posting this...I'm sure it'll be used as a solution in the future...
If I read corerctly:

Quote:

local: /home/aliali/Desktop/FTP/robat remote: /home/aliali/Desktop/FTP/robat
FTP assumes there is a folder /home/aliali/Desktop/FTP/robat at the other end, and...threre's not...

Thanks for this contribution!

Thor


All times are GMT -5. The time now is 09:32 AM.