# tftp server is not working

## ferris5

Hi all,

I emerged tftp

then i try to save a file from a cisco switch to my gentoo tftp server.

cisco says: tftp error 2 , only absolute filenames allowed.

when i do it from my tftp server:

tftp>connect x.x.x.x

tftp>get <filename>

transfer timed out

???

What am i doing wrong most be something simple.

if got no iptables running because i am on the local network together with the switch.

doing nmap i see that udp port 69 is open, sooo

anyone?

----------

## misho

I reccomend using proftpd. it's extremely easy to set up and shouldn't give you any such problems. Also, if you shoose to do this, DO NOT get "gproftpd". That's probably the only way to stop proftpd from working properly.

----------

## ferris5

but is this program ftp server program, not a  tftp server program?

i think its a ftp server

----------

## devon

Is there anything in /var/log/messages? Did you create the file on the TFTP server before trying to copy from the Cisco switch? What does your /etc/xinetd.d/tftpd file look like?

----------

## tomcat22

hi,

i have the same problem, currently using tftp-hpa. the tftp-server is running, but I can't get no file. requestion-result is 

```
Error code 2: Only absolute filenames allowed
```

, altough my /tftpboot directory is world readable. 

here's my complete /etc/xinetd.d/tftp 

```
service tftp

{

         disable = no

         socket_type = dgram

         protocol = udp

         wait = yes

         user = root

         server = /usr/sbin/in.tftpd

 }
```

and here my /etc/conf.d/in.tftpd 

```
INTFTPD_PATH="/tftpboot"

INTFTPD_OPTS="${INTFTPD_PATH}"

```

any idea what is missing? thanks in advance hopefully  :Smile: 

yours, tom

----------

## CoolAJ86

I did a fresh emerge of tftp-hpa and the initial init script doesn't work even. If I modify the script to echo ${INTFTP_OPTS} it shows the options that I want, however, it won't work with the variable. If a replace ${INTFTP_OPTS} with the actual parameters "-l -s /tftpboot" in /etc/init.d/in.tftpd it will work fine. When I use xinetd it with the config listed above it won't work. I've tried adding ">& /root/tftpd.err.log to catch any errors that might be causing /etc/init.d/in.tftpd to not work when I use the variable, it creates the file, but doesn't put anything in it!

Has anyone figured this out? Is there a bug for it yet?

----------

## tomcat22

I don't know anymore what I did, but somehow it works now. I think after installing I just had to restart the adequate service.

tom

----------

## AsianSpices

Gee that doesnt really help us out the peopl who are not reading these posts to find the solution  :Sad: 

I had the same problem 

I was trying to send a file from my router to the tftp server

But the problem was it was tellin me permission denied

So i created the file in /tftpboot and changed the privilages 

and it worked.

Does anyone else hav to do this?

and if there is a solution please let me know

to tftp without creating the file first and changing the permissions

----------

## PoltheMol

i had the same problem at first, but found a workaround:

for example i want to save router.confg

i first make on the tftpserver an empty textfile router.confg which gets a nice chmod 777 over it. After that i save the config from the router on the tftp, for some weird reason that seems to work out pretty fine (though it is a workaround, don't know the real issue)

----------

## AngelKnight

There exist TFTP servers which do not allow any uploads that would result in creating a new file.  You can only replace existing files on such a TFTP server which happen to be writeable by the tftpd process running on the server.

----------

## fatcat.00

Old topic, yes, but since I just ran into the same permissions problem I thought I would post what fixed this for me.  All I had to do is add the "-p" option to the server arguments.  -p forces the tftpd daemon to only pay attention to the file permissions to determine whether a file can be read/written.  

My /etc/xinetd.d/tftp file looks like this:

```
service tftp

{

        socket_type     = dgram

        protocol        = udp

        wait            = yes

        user            = root

        server          = /usr/sbin/in.tftpd

        server_args     = -p -c -vvv -t 100 -s /tftpboot

        log_on_success  += DURATION PID HOST EXIT

        log_on_failure  += HOST

        disable         = no

        only_from       = localhost 127.0.0.1 10.0.1.0/24

} 
```

----------

