tftpd-hpa使用完全教程
来源:互联网 发布:sql password函数 编辑:程序博客网 时间:2024/06/08 15:19
0,源代码下载地址:https://www.kernel.org/pub/software/network/tftp/
1,安装,
sudo apt-get install tftpd-hpa2,tftp-hpa 的配置文件为 /etc/default/tftpd-hpa
#Defaults for tftpd-hpa
RUN_DAEMON="no"
OPTIONS="-s /home/ch/tftpboot -c -p -U 077 -u tftpd"
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/ch/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
3,使用选项,-s选项,secure选项,后面要跟一个目录,否则会报错。
Dec 13 14:14:42 ch-Founder-PC in.tftpd[12796]: no -s directory
-c选项,是可以写文件。但是-c选项必须要在-s选项存在的情况下才能发挥作用。
-l选项,可以自己启动,不依赖与xinetd,或者/etc/init.d/tftpd-hpa脚本。
-v选项会在/var/log/syslog里面写入日志,-vv会写入更详细的信息。
root@ch-Founder-PC:~# /usr/sbin/in.tftpd -l -vv -s /home/ch/tftpboot
root@ch-Founder-PC:~# tftp 172.22.24.150
tftp> put openbsdinetd
Error code 1: File not found
tftp> put strlcpy.c
Error code 1: File not found 这里是没有使用-c选项
tftp> put strlcpy.c
Sent 480 bytes in 0.0 seconds 这里是使用了-c选项
tftp> put strlcpy.c
Error code 2: Only absolute filenames allowed 这里没有使用-s选项
tftp> put /root/strlcpy.c
Error code 0: Permission denied 这里使用了-c选项,但是没有使用-s选项
tftp> put strlcpy.c
Sent 480 bytes in 0.0 seconds 这里使用了-s选项和-c选项
tftp>
root@ch-Founder-PC:~# /usr/sbin/in.tftpd -l -vv -s /home/ch/tftpboot -c
root@ch-Founder-PC:~# /usr/sbin/in.tftpd -l -vv -c
root@ch-Founder-PC:~# /usr/sbin/in.tftpd -l -vv -s /home/ch/tftpboot -c
Dec 13 14:35:53 ch-Founder-PC in.tftpd[12944]: WRQ from 172.22.24.150 filename openbsdinetd
Dec 13 14:35:53 ch-Founder-PC in.tftpd[12944]: sending NAK (1, File not found) to 172.22.24.150
Dec 13 14:36:24 ch-Founder-PC in.tftpd[12945]: WRQ from 172.22.24.150 filename strlcpy.c
Dec 13 14:36:24 ch-Founder-PC in.tftpd[12945]: sending NAK (1, File not found) to 172.22.24.150
Dec 13 14:38:59 ch-Founder-PC in.tftpd[12965]: WRQ from 172.22.24.150 filename strlcpy.c
Dec 13 14:40:58 ch-Founder-PC in.tftpd[12977]: WRQ from 172.22.24.150 filename strlcpy.c
Dec 13 14:40:58 ch-Founder-PC in.tftpd[12977]: sending NAK (2, Only absolute filenames allowed) to 172.22.24.150
Dec 13 14:42:17 ch-Founder-PC in.tftpd[12982]: WRQ from 172.22.24.150 filename /root/strlcpy.c
Dec 13 14:42:17 ch-Founder-PC in.tftpd[12982]: sending NAK (0, Permission denied) to 172.22.24.150
Dec 13 14:43:39 ch-Founder-PC in.tftpd[12995]: WRQ from 172.22.24.150 filename /root/strlcpy.c
Dec 13 14:43:39 ch-Founder-PC in.tftpd[12995]: sending NAK (0, Permission denied) to 172.22.24.150
Dec 13 14:50:13 ch-Founder-PC in.tftpd[13032]: WRQ from 172.22.24.150 filename strlcpy.c
length = strlen(msg) + 1;
memcpy(tp->th_msg, msg, length);
length += 4; /* Add space for header */
阅读全文
0 0
- tftpd-hpa使用完全教程
- Tftpd-hpa
- tftp与tftpd-hpa
- 【实验一】bashrc source nfs tftpd-hpa
- Ubuntu上,tftpd-hpa 启动失败的解决方法.
- ubuntu 配置ckermit nfs tftpd-hpa ssh vim ftp wine virtualbox JDK ctags cscope
- OkHttp使用完全教程
- OkHttp使用完全教程
- OkHttp使用完全教程
- OkHttp使用完全教程
- OkHttp使用完全教程
- VIM完全使用教程
- OkHttp使用完全教程
- 【教程】InstallShield使用完全教程
- 【教程】InstallShield使用完全教程
- 【教程】InstallShield使用完全教程
- 【教程】InstallShield使用完全教程
- how to config the tftpd-hpa server in the ubuntu using for remote tftp client '-p' and '-r' command
- PHP笔记
- .Net 下载
- ubuntu:一次系统事故及其后续处理经验.
- 理解link以及软链接
- 工业的顶级化发展就是人工智能,人工智能在工业界的落地又如何呢?
- tftpd-hpa使用完全教程
- 21、Android开发基础之了解AndroidManifest.xml清单文件
- 双重检查锁定(double-checked locking)与单例模式
- 如何在webpack中获取git版本和当前脚本的工作目录
- PHP mkdir()无写权限的问题解决方法
- leetcode 503. Next Greater Element II
- Golang从入门到精通(十五):Golang指针
- 利用html,JavaScript计算常用图形面积
- 外边距塌陷