Operating System - HP-UX
1821413 Members
2525 Online
109633 Solutions
New Discussion юеВ

Re: TFTP transfer permission error

 
mikygee
Occasional Contributor

TFTP transfer permission error

Hello,

I have an HPUX machine,
HP-UX B.11.11 U 9000/800
with a tftp server on it.

Uploading a file on this machine works when the file already exists in the tftp directory.
It fails when the file doesn't already exist.

- I have used tftp servers(atftp) with Linux and it doesn't require a file to exist before being uploaded by tftp. So I assume tftp servers are able to do that in general.
- The Cisco website tells to set the TFTPTYPE variable to OVERWRITE but I don't know how to do it.

These hints make me suppose it's possible to do what I want.

Can you tell me how to set the TFTPTYPE variable and if someone already had this problem.

Thank you
8 REPLIES 8
Peter Godron
Honored Contributor

Re: TFTP transfer permission error

Hi,
and welcome to the forums !

Please see this external link:
"Setting the HP-UX TFTPTYPE Environment Variable"
http://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/cwparent/cw32/cw32ref/tftp.htm#xtocid151105

Please read:
http://66.34.90.71/ITRCForumsEtiquette/after.html

Please also read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#33
on how to reward any useful answers given to your questions.
Robert-Jan Goossens
Honored Contributor

Re: TFTP transfer permission error

Hi,

TFTPTYPE can take the value OVERWRITE (the file must exist and is overwritten) or NOOVERWRITE (the file must not exist and cannot be overwritten).

# su - tftp

# export TFTPTYPE=NOOVERWRITE

or add it to your tftp .profile.

http://www.cisco.com/univercd/cc/td/doc/product/rtrmgmt/cwparent/cw32/cw32ref/tftp.htm#xtocid151107

Regards,
Robert-Jan
mikygee
Occasional Contributor

Re: TFTP transfer permission error

Thank you for your answer. But I forgot to precise that the tftpuser has no shell.
tftp:*:516:516:Tftp User for Network:/tftpdir:/usr/bin/false.
Do you think it will still consider the .profile ?
Robert-Jan Goossens
Honored Contributor

Re: TFTP transfer permission error

.profile will not work ...... looks like you can setup a configuration directory /tftboot, but I can't find the name of the file you have to use.

tftp dgram udp wait root /user/etc/in.tftpd in.tftpd -s /tftpboot
mikygee
Occasional Contributor

Re: TFTP transfer permission error

The link says
"TFTPTYPE can take the value OVERWRITE (the file must exist and is overwritten) or NOOVERWRITE (the file must not exist and cannot be overwritten)."

But is there a way to configure the server so the file MUST NOT exist and CAN be overwritten ?
Robert-Jan Goossens
Honored Contributor

Re: TFTP transfer permission error

I think you are using the HP version of tftp, wich is used for bootp

http://docs.hp.com/en/B2355-90147/ch05s08.html

---
If the transfer is a put operation (which is not something a BOOTP client will be doing as part of the BOOTP protocol), then this message means that the file did not have sufficient write permissions for the server to write to the file. If the server is to receive a file, it must already exist and be writeable by the user tftp. For example, if a tftp client is sending the file named fontlist, the file must be mode 0600 and owned by tftp:
---
Jim Keeble
Trusted Contributor

Re: TFTP transfer permission error

HP's tftpd is different from some others. See this statement from the tftpd man page:

Furthermore, tftp clients can only read files in that directory if they are readable by the pseudo-user tftp, and tftp clients can only write files in that directory if they exist and are writable by the pseudo-user tftp.
mikygee
Occasional Contributor

Re: TFTP transfer permission error

Hello and thanx for your answers