ubuntu 下的tftp服务配置
来源:互联网 发布:自动结束进程软件 编辑:程序博客网 时间:2024/05/28 06:06
配置eth0的 IP地址, 同时激活该设备。
#ifconfig eth0 192.168.1.10 netmask 255.255.255.0 up
1. Install tftpd and related packages.
$ sudo apt-get install xinetd tftpd tftp
2. Create /etc/xinetd.d/tftp and put this entry:
service tftp
{
disable =no
socket_type =dgram
protocol =udp
wait =yes
user =root
server =/usr/sbin/in.tftpd
server_args =-s /tftpboot
per_source = 11
cps = 1002
flags = IPv4
}
3. Make /tftpboot directory
$ sudo mkdir /tftpboot
$ sudo chmod 777 /tftpboot
把/etc/init.d/atfpd
文件中的if["$USE_INETD"="true"]中的true改为false
4. Start tftpd through xinetd
$ sudo /etc/init.d/xinetd restart
5. Testing. Tranfering file hda.txt from 192.168.1.100 (Client using tftp) to 192.168.1.100 (Server 192.168.1.100). Get an example file to transfer (eg. hda.txt)
$ touch /tftpboot/hda.txt
$ chmod 777 /tftpboot/hda.txt
$ ls -l /tftpboot/
total 0
-rwxrwxrwx 1 davids davids 0 2006-03-27 23:04 hda.txt
$ tftp 192.168.1.100
tftp> put hda.txt
Sent 722 bytes in 0.0 seconds
tftp> quit
$ ls -l /tftpboot/
total 4
-rwxrwxrwx 1 davids davids 707 2006-03-27 23:07 hda.txt
http://hi.baidu.com/wwwkljoel/blog/item/af42f612ade9905bf919b856.html
[注意事项]
如果从tftp服务器下载失败,
要确保服务器的根目录有可执行的权限。
$ chmod -R 777 tftp
使用中发现能正常下载文件,
$ tftp 192.168.1.222
tftp> get zImage
Received 1692890 bytes in 0.2 seconds
可是上传文件不成功,
提示错误:
tftp> put dic.txt
Error code 2: Access violation
求助于google, 得下面一段说明,问题解决。
The tftp man page says:
Because there is no user-login or validation within the TFTP
protocol, the remote site will probably have some sort of
file-access restrictions in place. The exact methods are
specific to each site and therefore dif ficult to document here.
So apparently the site you're trying to get the file from has some
kind of access restrictions in place. Take a look at the tftpd man
page on the remote host. The linux tftpd manual says, in part, "Due to
the lack of authentication information, tftpd will allow only publicly
readable files to be accessed. Files may be written only if they
already exist and are publicly writable."
上面主要意思就是: tftp服务器缺少必要的身份验证,
所以默认只允许下载文件,要上传文件,必须是服务器中已存在同名的文件,
且该文件权限允许被覆盖。
所以首先在服务中创建一个与要上传的文件同名的文件,并更改权限。
$ touch dic.txt
$ chmod 777 dic.txt
重新上传,成功。
tftp> put dic.txt
Sent 13770 bytes in 0.0 seconds
- Ubuntu下 TFTP服务的配置
- ubuntu 下的tftp服务配置
- ubuntu下配置tftp服务
- ubuntu下配置tftp服务
- Ubuntu下配置tftp服务
- Ubuntu下配置tftp服务
- Ubuntu下配置TFTP服务
- Ubuntu下配置tftp服务
- ubuntu下tftp服务配置
- Ubuntu tftp服务的配置
- ubuntu tftp服务的配置
- 配置Ubuntu的tftp服务
- ubuntu下配置NFS, tftp服务
- ubuntu下tftp服务配置及应用
- Ubuntu下安装配置tftp服务
- ubuntu 9.04 下tftp服务配置
- ubuntu下配置NFS,TFTP服务
- ubuntu下配置 tftp NFS服务
- 大学读书计划
- SplitContainer
- 高效的网络消息类实现
- 华为IMS网管部署方式
- 国外虚拟主机域名绑定方法,及Addon Domain/Subdomains/Parked domain详解
- ubuntu 下的tftp服务配置
- 初来乍到
- 二叉搜索树-非递归
- 我学习的道路
- redirect dialog problem ie 8 (window.location problem)
- MovableText(公告牌写字)
- squid 的 read error
- WIN32中输出double浮点数
- 华为U2000统一网管