LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-06-2012, 02:20 PM   #1
drpbx911
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Rep: Reputation: 0
Unhappy tftp server allowing write but then zero outs the file ???


This used to work fine but not now. I can save my Cisco configs to the tftp server and using Nautilus I can watch the tftpboot directory and the file gets copied to the directory and the correct file size posts. 2 to 3 seconds later it updates to 0 bytes. If I use a terminal session to open the file when it first posts with the correct size using vi it looks correct. I'm using root to do this and I can write it back and the first time I wrote the file back it zeroed out. I wrote it again and it finally stayed. I've tried different directories under the tftpboot directory and tried changing the owner and permissions. None of this seemed to work.

This used to be very reliable.
Something is modifying the files and setting them to zero bytes.
I'm uncertain where to go from here.

I have installed many packages between tftp-hpa being set up and me noticing the problem. i.e. nfs, nagios and many more.

thanks in advance.
 
Old 04-19-2012, 05:20 AM   #2
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Rep: Reputation: 0
Hi

i have a similar issue on my site.
My iptables is down and i see that the packets from the switch are entry in the tftp server:

[root@machine tftpboot]# tcpdump -n -i eth0 -vvv port tftp

tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 96 bytes
10:34:11.588373 IP (tos 0x0, ttl 254, id 37752, offset 0, flags [none], proto: UDP (17), length: 63) 192.168.30.1.fcip-port > 192.168.30.10.tftp: [udp sum ok] 35 WRQ "swismal4210.cfg" octet tsize 9629

but, after 10 packets like this the file is crated with 0 bytes.

On the switch side i see a 90 sec timeout after a "Can't connect to the server" messagge

It works well with other switches in the same network of the server, so the problem seems to be something related with NAT, firewall(acting as a router between the two nets) and tftp protocol.

I saw some documents to config the tftp service in the firewall, but unfortunatley i'm not the admin of the firewall.

I dont know if this is your case.


pd. i don't trust myself about it, but i remember that this works the first time i programmed the script.

Regards
 
Old 05-06-2012, 12:23 PM   #3
drpbx911
LQ Newbie
 
Registered: Oct 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Talking Solved

I suspected it might have been related to some security feature and that may be.
I use this to support my Cisco lab and here's what I've learned.

Ensure the IP address of the machine that you are writing from is in the /etc/hosts table and it will work.

With a lab environment this IP address can change with different configurations.

As a work around, configure a loopback interface with a static IP address that is advertised in your routing protocol.
In addition use the command "IP TFTP SOURCE-ADDRESS LOOP 0" and then the loopback address will be the one used as the source of the tftp operation and since it is now in your /etc/hosts file it should solve your problem.

HTH
 
  


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
allowing read write to ext3 partition to non-root users austinium Linux - Newbie 2 03-18-2010 06:25 AM
SELinux is preventing in.tftpd (tftpd_t) "write" to my tftp server designlogicmedia Linux - Newbie 4 09-07-2009 11:30 AM
Slackware 11 not allowing me write access to FAT32 HDD Bimbalhada Slackware 3 12-05-2006 02:03 PM
LTSP server TFTP file not found error LinuxRam Linux - Networking 11 09-02-2004 12:13 AM
Allowing read/write on mounted captive-ntfs partition divsky Linux - General 6 04-15-2004 10:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:46 AM.

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
Open Source Consulting | Domain Registration