# tftp Error code 256



## Vizard (Oct 14, 2012)

Hello everyone,

When trying to get a file from tftp as follows:

```
xxx-xxx-xxx# tftp 10.0.0.1
tftp> get /tftpboot/pxeboot
Got ERROR packet: File not found
Error code 256: File not found
tftp>
```
I get the above error. This was working earlier on my system. I am not sure where to look for what may be causing this.


----------



## wblock@ (Oct 14, 2012)

Does /tftpboot/pxeboot exist?  Do the permissions allow it to be read?


----------



## Vizard (Oct 14, 2012)

Yes, it worked before, I had it pxe-booting. I even changed the permissions of both the directory and the file with chmod 777. It just seems to have stopped working?


----------



## wblock@ (Oct 14, 2012)

What I meant was that something may have deleted the file.  Is the tftp daemon running?
`# ps axw | grep tftp`


----------



## Vizard (Oct 14, 2012)

When I run the command i get:

40337   0  S+     0:00.00 grep tftp


----------



## wblock@ (Oct 14, 2012)

That says no, it is not running.  So start it, either with inetd(8) or in /etc/rc.conf if you have installed ftp/tftp-hpa.


----------



## Vizard (Oct 14, 2012)

It is started with inetd, would you suggest for me to try installing ftp/tftp-hpa?


----------



## wblock@ (Oct 14, 2012)

Oh, wait.  inetd only starts it on demand.  Is inetd enabled in /etc/rc.conf?

I use ftp/tftp-hpa.  It has more options and I think is faster.


----------



## Vizard (Oct 14, 2012)

Yes it is. I will attempt to install that and see how it works.


----------



## wblock@ (Oct 14, 2012)

tftpd can also be run from the command line, giving it the same options as in inetd.conf.  That would show if inetd is the problem.


----------



## SirDice (Oct 15, 2012)

Vizard said:
			
		

> Yes, it worked before, I had it pxe-booting. I even changed the permissions of both the directory and the file with chmod 777. It just seems to have stopped working?



Resist the urge to chmod(1) something to 777! Now anybody with access to your TFTP server can upload a (backdoored) pxeboot.


----------

