Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
}
share|improve this question

2 Answers 2

up vote 0 down vote accepted

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?

share|improve this answer
    
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 '11 at 12:41
    
The -s argument is what was missing. Added that and everything started working. Thanks –  John P Jun 23 '11 at 14:09

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
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.