LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Receiving files via TFTP (https://www.linuxquestions.org/questions/linux-software-2/receiving-files-via-tftp-174804/)

wswartz 04-26-2004 03:01 PM

Receiving files via TFTP
 
I'm trying to use my linux (Fedora Core 1) laptop to receive files via TFTP. I have a switch and a router. Both of these can download code or upload their configuration to a TFTP server. I can download code to them with no problem but I can't seem to upload their config to the TFTP server.

I've checked iptables and it isn't running on my machine. I used nmap to see if port 69 is open and it is. I've looked in the /etc/xinetd.d/tftp file and here is my config from /etc/xinetd.d/tftp file:

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

I've read that the "-c" in the server_args line should allow me to write to the tftp server but it doesn't seem to work. Any ideas? Where is logging done for tftp so I might be able to see any errors and such?

Thanks, BS

wswartz 04-28-2004 03:39 PM

Anyone out there with any thoughts? By the way, I checked the permissions on the /tftpboot directory; they are all read/write for everyone.

BS

nattydred 06-09-2004 02:25 PM

how did thus turn out . im having the same problem

MadProf 06-27-2004 09:44 PM

Check /etc/hosts.allow file .....

nattydred 06-28-2004 08:38 AM

here is my hosts.allow file

######################

#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
ALL:ALL



is this correct????

MadProf 07-01-2004 10:31 PM

ok


First check if tftp process if up :

[root@Iago log]# netstat -na | egrep 69
udp 0 0 0.0.0.0:69 0.0.0.0:*


if ok, then verify if you have ipchains or iptables running:

find / -name iptables -print


iptables -L

to verify if and/or what is allowed into your box.

if no acl issue ,

then verify permission on the tftp directory ..


Let me know that fixes your problem or not ...


Good Luck

nattydred 07-02-2004 08:49 AM

here are the permission on my tftpboot dir
[root@mis-fr2-roberts root]# ls -al /tftpboot
total 8
drwxrwxrwx 2 root root 4096 Jun 15 22:04 .
drwxr-xr-x 22 root root 4096 Jul 2 08:19 ..

i get the same error if my iptables are started ot stoped

MMOB-1-MSFC2-1#copy run tftp
Address or name of remote host []? 10.5.6.50
Destination filename [mmob-1-msfc2-1-confg]?
TFTP: error code 1 received - File not found

%Error opening tftp://10.5.6.50/mmob-1-msfc2-1-confg (Undefined error)


and i did check to see if tftp was working

[root@mis-fr2-roberts root]# netstat -na | egrep 69
udp 0 0 0.0.0.0:69 0.0.0.0:*
unix 2 [ ACC ] STREAM LISTENING 4675 /tmp/orbit-root/linc-aa2-0-150db71520d69
unix 2 [ ACC ] STREAM LISTENING 4843 /tmp/orbit-root/linc-abf-0-722690f79b997


any other ideas

MadProf 07-02-2004 11:24 PM

tftp
 
It possible that your problem is that tftp directory does not give rw access.

Verify the directory permission:

[root@Iago tftp]# ls -al
total 40
drwxr-xr-x 3 tftpd root 4096 Jun 28 00:08 .
drwxr-xr-x 22 root root 4096 Jun 27 22:00 ..
drwxr-xr-x 2 tftpd root 4096 Jun 27 22:08 archives
-rw-r--r-- 1 tftpd tftpd 815 Jun 27 22:07 configd.confg
-rw-rw-rw- 1 tftpd tftpd 1334 Jun 27 23:59 fr.confg
-rw-rw-rw- 1 tftpd tftpd 2919 Jun 27 22:40 r1-confg
-rw-rw-rw- 1 tftpd tftpd 1894 Jun 27 23:53 r2.confg
-rw-rw-rw- 1 tftpd tftpd 1853 Jun 27 23:53 r3.confg
-rw-rw-rw- 1 tftpd tftpd 2212 Jun 27 23:53 r4.confg
-rw-rw-rw- 1 tftpd tftpd 1816 Jun 30 08:55 terminal-server.confg



create a user for tftp:
useradd -d /dev/null -s /bin/nologin tftpd
/usr/sbin/useradd -d /dev/null -s /bin/nologin tftpd

Create a directory with the right permissions:
mkdir /usr/local/tftp
Give ownership to tftpd
chown -R tftpd /usr/local/tftp

This should definitely fix the server side of TFTP .... The router side appears to have correct syntax.



Good luck

charon79m 09-20-2004 03:44 PM

TFTP by default won't create a file...
 
The TFTPD will not allow a remote person to create a file. You must first create the file then tftp will fill that file with the data.

The -c is the fix...

I'm having an issue with this too. Anyone have any ideas as to how to pass the -c option from within the /etc/inet.conf file?

MrKnisely


All times are GMT -5. The time now is 03:15 AM.