LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   cant put or get files in ftp (https://www.linuxquestions.org/questions/linux-networking-3/cant-put-or-get-files-in-ftp-424564/)

Singist 03-13-2006 06:55 PM

cant put or get files in ftp
 
Hi all,
when i try to get or put files via ftp from linux to linux, i gain access with login password etc, but it keeps telling me that there is no such file or directory when there clearly is. i have taken passive mode off but makes no difference. ls command clearly shows the file on the remote system so using get should place that file on the local machine. the response i get back is 550 processes:(the name of the file im trying to get)No such file or directory.
Any help would be great as i'm spending far too many hours on it. Thanx
Singist

zidane_tribal 03-13-2006 08:34 PM

hmmm, this may sound silly, but check the case of the filename. linux is case sensitive, so FiLe is not the same as file.

you might also want to check permissions on the file, make sure you can actually read it.

does the filename have things like spaces in it, or other special characters? most ftp clients, when they see 'get this file.txt' will thingk you mean 'get this', if your filename does have spaces, you can use a quotations, like 'get "the file.txt"'

Singist 03-14-2006 02:55 AM

The filename in question is called processes, ive checked the case from system to system and it has the permissions set to 600, there are no spaces in the filename and in case you're wondering why it isn't processes.txt, i changed it to see if it would make any difference but to no avail.
Thanx for replying
A stressed out Singist

zidane_tribal 03-14-2006 05:15 AM

curiouser and curiouser. can you get any file from the remote machine via ftp?

Singist 03-14-2006 06:38 AM

now you come to mention it, no i can't. just tried several files that i created on the fly but it dodnt work. This is somewhat bizarre.
Singist <close to the window..lol>

nx5000 03-14-2006 06:47 AM

can you make a "ls" or "dir"
?
If no open the window :)

edit:forget my post, I will learn to read one day ;-)

Singist 03-14-2006 07:13 AM

yes i can ls, pwd etc...however when i put the file across to the remote machine..it was successful, but when i checked the contents of each file on local and remote..the content is completley different
A bewildered Singist, <shuffles pc's nearer to the window>

Singist 03-14-2006 07:16 AM

i actually want the disc usage stats that cron is redireting to a text file. this text file is what im, trying to 'get'. im using a here file to grab it via ftp....gets as far as making the connection, but then it says file or directory does not exist.<shrugs shoulders>

zidane_tribal 03-14-2006 07:26 AM

so, you are able to connect, to view directories and their contents, but if you put a file, it comes out mangled, and if you get a file, it doesnt work at all?

this is very unusual to say the least....

as for putting the file... are you sure your transferring it in the right mode? (ascii or binary)... it sounds like a lame answer, because i really cant think of anything else that would cause that.

to be honest, im clutching at straws. this certainyl seems very very unusual. but perhaps there is another way. rather than using here files and ftp, why not use wget, it can grap things from ftp's.

eg: a script to use wget to grab a file from an ftp and then cat it.

Code:

#!/bin/bash

#use wget to grab an ftp file
wget ftp://username:password@my.ftp.com/path/to/processes

#cat the local file
cat ./processes

try it with wget, and see if that works, wget seems to be a little more resiliant to strangeness than ftp and here files when scripting (at least, in my experience anyways)

(and if this doesnt work, push the pc out the window, its been asking for it ;) )

Singist 03-14-2006 07:44 AM

ok it now seems that the ftp is not working on the remote machine, its using proftp that comes with xampp.xampp is also installed onlocal machine. both usernames and passwords are the same but when i try to connect to local from remote...login and password fails. odd that local to remote works but no the other way round.

zidane_tribal 03-14-2006 07:49 AM

hmmm, i have never used proftpd personally, i always tend to stick with vsftpd (here http://freshmeat.net/projects/vsftpd/ if your distro doesnt have its own rpm or similar.)

as for clients... wget is my favourite, simply because its awesome, but goof old 'ftp' comes a close second.

Singist 03-14-2006 08:21 AM

ok get this..ive just installed vsftpd in /etc, unpacked it and checked the status by typing service vsftpd status, i got in return vsftpd unrecognised service. what the hell is going on with this system?


All times are GMT -5. The time now is 12:42 PM.