[Turn]tftp shows the solution for file not found when put uploads

Source: Internet
Author: User
Tags system log

[Turn]tftp shows the solution for file not found when put uploads

http://blog.163.com/pengcz%40126/blog/static/3590860720118243379902/

Under Linux, the TFTP service is disabled by default, regardless of which super-server,inetd or xinetd is used, so modify the file to open the service.

Depending on the installation method (1), the file/etc/xinetd.d/tftp can be modified. The main is to set the root directory of the TFTP server to open the service. The modified file is as follows:

Service TFTP

{Socket_type =dgram

Protocol =UDP

Wait =yes

User =root

Server =/usr/sbin/in.tftpd

Server_args =-s/home/lqm/tftpboot-c

Disable =no

Per_source =11

CPS = 100 2

Flags =ipv4

}

Description: Modify the item server_args=-S <path>-C, where <path> can be changed to the root of your tftp-server, parameter-s specifies that chroot,-c specifies that the file can be created.

3. Create the TFTP root directory and start Tftp-server.

#mkdir/home/lqm/tftpboot

#chmod O+w/home/lqm/tftpboot

#service xinetd Restart

Stop xinetd: [OK]
Start xinetd: [OK]

In this way, the Tftp-server is started. You can log in to this machine to test the following, command as follows:

#tftp <your-ip-address>

Tftp>get <download file>

Tftp>put <upload file>

Tftp>q

#


problems and causes during installation
Phenomenon One:
Tftp> Get Test.log
Transfer timed out.
Reason:
TFTPD Service not started

Phenomenon II
Tftp> put Test2
Error Code 0:permission denied

Reason:
Run the command to view the system log
#tail/var/log/messages
The following text is found:
Mar 19:05:26 localhost setroubleshoot:selinux is preventing/usr/sbin/in.tftpd (tftpd_t) "Write" to Tftpboot (TFT      pdir_t). For complete SELinux messages. Run Sealert-l 40a5a6bf-8ded-4bfa-ab6e-fa669a25fc6c
Know this is caused by selinux, in FC3 and FC3 after the FC version of the SELinux default is open, now turn it off, modify the file/etc/sysconfig/selinux, set the

Selinux=disabled

Then restart your computer to

or execute the command System-config-securitylevel open the Security Level Configuration dialog box to change the SELinux (S) option to "Allow" in "force".

Phenomenon Three:
Tftp> put Ex070416.log
Error Code 1:file not found
Reason:
The specified file does not exist, or the-C option is not specified in the TFTPD startup parameter, allowing the file to be uploaded

Phenomenon Four:
Tftp> Get Test.log
Error Code 2:only Absolute filenames allowed
Reason:
The Server_args set in/ETC/XINETD.D/TFTPD is/ETC/DEFAULT/TFTPD-HPA
Cat/etc/default/tftpd-hpa
#Defaults for TFTPD-HPA
Run_daemon= "No"
options= "-s/home/tftpd-c-p-u 077-u tftpd"
When set, just change the server_args= to the server folder you set yourself.

[Turn]tftp shows the solution for file not found when put uploads

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.