1820879 Members
5069 Online
109628 Solutions
New Discussion юеВ

TFTPD and upload

 
G_44
New Member

TFTPD and upload

HPUX 10.20

Hi all,

I'm in trouble with my TFTPD Config and especially with the upload on my TFTP Server.
I'm able to donwload files contained in the root directory but uploading files ont it remains impossible...
For exemple :
$ tftp 10.10.10.122
tftp> put bs450.cfg
putting bs450.cfg to 10.10.10.122:bs450.cfg [netascii]
sent WRQ <file=bs450.cfg, mode=netascii>
received ERROR <code=1, msg=File not found>
Error code 1: File not found

I've tried many options with the put command but I dont't think it matters here.

my TFTPD is declared in my /etc/inetd.conf as :
tftp dgram udp wait root /usr/lbin/tftpd tftpd

and here is the entry in my /etc/passwd :
tftp:*:101:3:tftp user:/usr/tftpdir:/usr/bin/false

finally, here are the properties of the tftp root dir /usr/tftpdir:
drwxrwxrwx tftp sys

What have I misconfigured ? I don't understand...! Is this a known porblem ?

Thanks in advance if someone is able to help me.
-Alex
8 REPLIES 8
SSP_1
Regular Advisor

Re: TFTPD and upload

Hi Alex,

have U checked your /var/adm/inetd.sec, pl post the file as an attachment, let me have a look at it.

thanx
shripad
Obstacles exist to challenge you to keep going. Not to quit.
SSP_1
Regular Advisor

Re: TFTPD and upload

OR try including the shell /usr/bin/false of tftp id in to /etc/shells file. & do inetd -c


shripad
Obstacles exist to challenge you to keep going. Not to quit.
Zeev Schultz
Honored Contributor

Re: TFTPD and upload

2 things - write permissions on tftp user directory and "-l" option in inetd.conf (run inetd -c after the change).Should give more debugging info.

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray
G_44
New Member

Re: TFTPD and upload

I don't think it comes from my inetd.sec, but you can take a look at it in the encs.

Concerning rigths on tftpdir directory :
the rights are: drwxrwxrwx
the owner is: tftp
the group is: sys

I've switched my inetd to verbose level, and I don't notice anything particular when attempting tftp connections, I only got that line:
Jun 19 13:54:55 uz0z0061 inetd[14440]: tftp/udp: Connection from host1 (10.10.10.11) at Thu Jun 19 13:54:55 2003

The problem is still there.
G_44
New Member

Re: TFTPD and upload

I've just found something interesting, on a TFTP tutorial, here is a short extract:

"Probably the biggest misconception made with regards to TFTP is how writing files to the server is handled. By default, TFTP expects the file to already exist on the server. This means that in order for our remote device to write a file to the server called "device.confg", it must exist in our chroot directory as writeable by our "tftpd" user.
You need the "-c" flag to allow the server to create files on its own. In our production INETD file, our configuration would appear as:

tftp dgram udp wait root /usr/sbin/tcpd in.tftpd -c -u tftpd -s
/usr/local/tftp"

So it seems that my pb is there : the impossibility to create a new file.

In that recent exemple, their tftpd has a flag made for, but unfortunately, on mine (HPUX 10.20) I haven't been able to find such an option :(
Zeev Schultz
Honored Contributor

Re: TFTPD and upload

1)"-l" option to tftpd NOT to the inetd.In
/etc/inetd.conf find a tftpd line and add "-l".
2)in the same place
Specify the files available to clients in the tftpd command line in /etc/inetd.conf:
tftpd dgram udp wait root /usr/lbin/tftpd tftpd [path...]

From here:
http://docs.fc.hp.com/hpux/onlinedocs/B2355-90147/00/00/48-con.html
So computers don't think yet. At least not chess computers. - Seymour Cray
G_44
New Member

Re: TFTPD and upload

There is no "-l" option for my tftpd...

I've tried adding different [paths] to my tftpd launch line in inetd.conf, it works perfectly for the GET (getting file from server) but not for the PUT (writing file on the server). It does not change anything.

But I've add a touch of the file I want to upload just before proceeding, and then, when file is present in the root dir of tftp, it works fine. (my purpose was to create scripts for uploading switchs config to my server automatically, by tftp)

The file need to be already there, before proceeding to the upload...

Here is the synopsis of my tftpd :
/usr/lbin/tftpd [-R retran-seconds] [-T total-seconds] [path ...]
Zeev Schultz
Honored Contributor

Re: TFTPD and upload

All right,I give up :)
Why to use tftp anyway...I know its used by
bootpd to deliver boot image and else...

Zeev
So computers don't think yet. At least not chess computers. - Seymour Cray