[CentOS] [CentOS 5] tftp-server, unable to create new files (even with "-c" option)

Davide Grandis davide.grandis at fastwebnet.it
Thu Sep 13 15:56:55 UTC 2007


Hi all,

I'm trying to setup a TFTP server to serve as repository for the  
config of all my Cisco network devices.

As per the the tftpd man, I've added the "-c" option into the /etc/ 
xinetd.d/tftp (as follows) but I still cannot get write access  
(unless the file is already present).

[root at chl1 ~]# cd /etc/xinetd.d
[root at chl1 xinetd.d]# cat tftp
# default: off
# description: The tftp server serves files using the trivial file  
transfer \
#       protocol.  The tftp protocol is often used to boot diskless \
#       workstations, download configuration files to network-aware  
printers, \
#       and to start the installation process for some operating  
systems.
service tftp
{
         disable = no
         socket_type             = dgram
         protocol                = udp
         wait                    = no
         user                    = root
         server                  = /usr/sbin/in.tftpd
         server_args             = -s -c /tftpboot
         per_source              = 11
         cps                     = 100 2
         flags                   = IPv4
}

And here is it concerning the home path owner & permissions:

[root at chl1 /]# ls -la
...
drwxrwxrwx   2 root root  4096 Sep 13 10:18 tftpboot
...
[root at chl1 /]# ls -la tftpboot/
drwxrwxrwx  2 root   root      4096 Sep 13 10:18 .
drwxr-xr-x 25 root   root      4096 Sep 13 17:48 ..
-rwxrwxrwx  1 nobody nobody 1811552 Sep 12 10:28 c3500xl-c3h2s-mz. 
120-5.WC17.bin
-rwxrwxrwx  1 nobody nobody    1181 Sep 13 17:51 pippo.config

(pippo.config = fake file)

This is what I get at the TFTP client side:

LabTI-Infra-3524XL-01#copy running-config tftp:
Address or name of remote host []? 10.58.2.204
Destination filename [labti-infra-3524xl-01-confg]?
TFTP: error code 1 received - File not found

%Error opening tftp://10.58.2.204/labti-infra-3524xl-01-confg  
(Undefined error)

LabTI-Infra-3524XL-01#
LabTI-Infra-3524XL-01#copy running-config tftp:
Address or name of remote host []? 10.58.2.204
Destination filename [labti-infra-3524xl-01-confg]? pippo.config
!!
2327 bytes copied in 0.831 secs

So, it means that the TFTP client can only *re-write* an existing  
file but not creating new ones, and this is the expected behavior if  
the "-c" parameter is omitted!

What am I missing?

Any suggestion really appreciated!

TIA,
Davide



More information about the CentOS mailing list