1

I have tftp installed on Ubuntu 10.04 with the below /etc/xinetd.d/tftp file.
I can connect to the tftp server using

tftp 10.1.1.54
get pxelinux.0

and it retreaves the file with no issue. When I try:

get /pxelinux.0

I get a

Error Code 2: Access violation

This is a problem because the HP PXE boot environment request the pxelinux.0 with the leading /. I suspect it is trying to use the server root directory as the / root instead of using /tftpboot as the root. I've looked at the docs, but I can't see a way to chroot tftp so is interprets the leading slash correctly

Thanks in advance.

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = /tftpboot
disable         = no
}

2 Answers 2

0

This could be a permissions problem, are /tftpboot and pxelinux.0 world readable?


Edit: Have you tried using the -s argument to tftpd to set the directory?

2
  • Yes -- the whole /tftpboot directory is 777. I can upload files and download the pxelinux.0 as long as I don't put in an absolute path.
    – John P
    Jun 15, 2011 at 12:41
  • The -s argument is what was missing. Added that and everything started working. Thanks
    – John P
    Jun 23, 2011 at 14:09
2

You can use the -s option to tftpd to accomplish what you want.

If I have a directory /tftpboot like this:

# ls /tftpboot
afile

And I run tftpd like this:

# tftpd -l -s /tftpboot

Then this:

tftp> get afile

Is equivalent to this:

tftp> get /afile

You would modify the server_args line of your configuration file:

service tftp
{
protocol        = udp
port            = 69
socket_type     = dgram
wait            = yes
user            = nobody
server          = /usr/sbin/in.tftpd
server_args     = -s /tftpboot
disable         = no
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .