LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-27-2007, 07:03 AM   #1
janardhan@eilabs.com
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Rep: Reputation: 0
Need assistance: TFTP file transfer between two linux PC's


Dear Sir/ Madam,

If you have played around with tftp commands please assist me.

I have two Linux PC's A and B.

A has IP address 192.168.2.15 where as B 192.168.2.30
A and B are connected through RJ45 cable.
Both A and B ping each other. --> Network is UP

My problem is all with tftp file transfer.....
When i try to connect B and send some file from A to B through tftp put command...

Ex:
$ tftp 192.168.2.30 69
tftp> put /home/jan/abc.txt

It gives me Error :: "File not found"


I tried my best to put/ get files but failed.
Always i get the same error "File not found"

Before using tftp commands do we need to edit any files in Linux PC?
What about firewalls issues?

Please acknowledge me regarding these issues.

Thanks,
Regards,
Janardhan
 
Old 11-27-2007, 07:12 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Arch/XFCE
Posts: 17,802

Rep: Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738Reputation: 738
I assume that you entered a login name, password, etc. (unless it is configured so that is not necessary).

I always go to the directory where I have files to sent (put) or files to receive (get), and THEN make the ftp connection. I've never tried it the way you show.

Same procedure on the remote machine---cd into the appropriate directory, then "get filename".

Summary:
cd to desired directory on local machine
connect to remote, login, password, etc.
cd to desired directory on remote
dir to verify content
put and get specific files
bye
 
Old 11-27-2007, 07:19 AM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978Reputation: 1978
You can also consider the lcd command to move across your local directories when you already have established connection to the remote server.
 
Old 11-27-2007, 09:34 AM   #4
Slick666
Member
 
Registered: Feb 2006
Distribution: Ubuntu 8.04; Debian Etch
Posts: 167

Rep: Reputation: 33
I would check the TFTP Server settings. Make sure it's pointing to the right directory that you have the files in. and that the server is up and running. Other than that TFTP should be pretty simple (The first T stands for Trivial ).

One good way to test it is on pc B, try connecting to yourself and pulling down the file. If it does not work you know it's your sever and not the network and visa versa.

Code:
Example:
   From a directory other than the one with the tftp files in it.
   Type "tftp localhost"
   Then try pulling a file down the directory that you are in
   "pull testfile.txt"
good luck

Last edited by Slick666; 11-27-2007 at 09:36 AM.
 
Old 11-27-2007, 02:31 PM   #5
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,158

Rep: Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875
tftp i.e. Trivial File Transfer Protocol does not require authentication. Have you verified that the tftp server is running on the B computer. The server runs from xinetd so make sure xinetd is running and that tftp is enabled i.e. disable=no, the -c options allows files to be created and also make sure the tftp directory /tftpboot directory or whatever you want it to be exists and has the proper permissions. Check to make sure that port 69 UDP is opened if running a firewall.


service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -c -s /tftpboot
disable = no
per_source = 11
cps = 100 2
}

Last edited by michaelk; 11-27-2007 at 02:41 PM.
 
Old 11-28-2007, 01:50 AM   #6
janardhan@eilabs.com
LQ Newbie
 
Registered: Nov 2007
Posts: 7

Original Poster
Rep: Reputation: 0
Need assistance: TFTP file transfer between two Linux PC's

Hi,

Thanks for your replies on TFTP issues.

TFTP commands are working....

1. After changing the permissions of tftpboot directory
/usr/sbin/in.tftpd file, and /var/run/xinetd.pid file
to read/write/execute .....

2. Replacing "-s /tftpboot" with "-c -s /tftpboot" in server_args
field of tftp file in /etc/xin etd.d/

Please explain me use of field "server_args"
server_args = -c -s /tftpboot

I understood that, -c option is for creating a new file.
What for -s option is used ?

Right now i am able to get/ put files only from the tftpboot directory in my TFTP server Linux PC.

Cant i get/ put files from other directories in my TFTP server PC ?

Please acknowledge me regarding these issues.

Regards,
Janardhan
 
Old 11-28-2007, 03:43 PM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,158

Rep: Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875Reputation: 1875
Quote:
Cant i get/ put files from other directories in my TFTP server PC ?
No. If you want to transfer files to any directory then you need to use a real ftp server.


-s Secure. When specified, the directory change to
homedir must succeed. The daemon also changes its root
directory to homedir.
 
Old 11-30-2007, 06:45 AM   #8
Slick666
Member
 
Registered: Feb 2006
Distribution: Ubuntu 8.04; Debian Etch
Posts: 167

Rep: Reputation: 33
My suggestion if your looking for a protocol to transfer files to other directories that is pretty easy to set is SSH. using scp and sshfs you can transfer and even mount different directories on your remote machine and almost all linux distro come with ssh installed and usually running.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tftp issue, unable to transfer kernel image using tftp to boot ltsp-client noobs4linux Linux - Networking 1 02-07-2007 01:53 AM
How to do file transfer in linux pspandu Linux - General 7 09-12-2006 02:09 AM
Transfer Rate Between PC's is slow. Please help Phantisy Linux - Networking 3 08-27-2005 02:46 PM
File Transfer from XP to Linux e11 Linux - Newbie 8 11-06-2004 11:17 AM
CGI in C: need assistance with file transfer Sm0k3 Programming 5 02-04-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration