pxe boot with tftpd-hpa failed with error: Forbidden Directory

Bug #531123 reported by Dmitry Ljautov
40
This bug affects 13 people
Affects Status Importance Assigned to Milestone
tftp-hpa (Ubuntu)
Fix Released
High
Chuck Short
Lucid
Fix Released
High
Chuck Short

Bug Description

Binary package hint: tftpd-hpa

lsb_release -rd
Description: Ubuntu lucid (development branch)
Release: 10.04
apt-cache policy tftpd-hpa
tftpd-hpa:
  Installed: 5.0-11ubuntu1

After migrating from karmic to lucid tftpd-hpa failed with error: Forbidden Directory.

Inserting "-s" before ${TFTP_DIRECTORY} in /etc/init.d/tftpd-hpa solved problem.
Please fix it...

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Which line are you talking about?

        if [ ! -d "${TFTP_DIRECTORY}" ]

perhaps?

Changed in tftp-hpa (Ubuntu):
importance: Undecided → High
status: New → Incomplete
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

What is your TFTP directory set to?

Revision history for this message
Dmitry Ljautov (dljautov) wrote :

# cat /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/pxe"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="-l -vvvvvvvvvv -B 512 -r blksize2 -m /etc/default/tftpd.rules"

do_start function in /etc/init.d/tftpd-hpa before fixing:

do_start()
{
        if [ ! -d "${TFTP_DIRECTORY}" ]
        then
                echo "${TFTP_DIRECTORY} missing, aborting."
                exit 1
        fi

        start-stop-daemon --start --quiet --oknodo --exec ${DAEMON} -- \
                --listen --user ${TFTP_USERNAME} --address ${TFTP_ADDRESS} \
                ${TFTP_OPTIONS} ${TFTP_DIRECTORY}
}

do_start function in /etc/init.d/tftpd-hpa after fixing:
o_start()
{
        if [ ! -d "${TFTP_DIRECTORY}" ]
        then
                echo "${TFTP_DIRECTORY} missing, aborting."
                exit 1
        fi

        start-stop-daemon --start --quiet --oknodo --exec ${DAEMON} -- \
                --listen --user ${TFTP_USERNAME} --address ${TFTP_ADDRESS} \
                ${TFTP_OPTIONS} -s ${TFTP_DIRECTORY}
}

Thierry Carrez (ttx)
Changed in tftp-hpa (Ubuntu):
status: Incomplete → Confirmed
assignee: nobody → Chuck Short (zulcss)
milestone: none → ubuntu-10.04-beta-2
status: Confirmed → Triaged
Revision history for this message
TJ (tj) wrote :

This appears to be the same issue as my report of failed PXE in bug #544377 "PXE Error: Only absolute filenames allowed" and is caused by the tftpd-hpa daemon not being started with --secure (-s) mode.

I added it to /etc/default/tftpd-hpa:

TFTP_OPTIONS="-s"

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tftp-hpa - 5.0-11ubuntu2

---------------
tftp-hpa (5.0-11ubuntu2) lucid; urgency=low

  * debian/rules, debian/tftpd-hpa.upstart: Convert to upstart.
    (LP: #522509)
  * debian/tftpd-hpa.postinst: Add "-s" to /etc/default/tftpd-hpa.
    (LP: #531123)
 -- Chuck Short <email address hidden> Thu, 11 Mar 2010 12:40:07 -0500

Changed in tftp-hpa (Ubuntu Lucid):
status: Triaged → Fix Released
Revision history for this message
Jakob Unterwurzacher (jakobunt) wrote :

Upgraded right now from 9.10 and hit this - NOT FIXED for this case!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.