我用的是Ubuntu8.04。
sudo apt-get install tftp tftpd xinetd
cd /etc/xinetd.d/
sudo vim tftp
更改后如下:
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
建立tftp服务文件目录
sudo mkdir /tftpboot
sudo chmod 777 /tftpboot -R
重新启动服务
sudo /etc/init.d/xinetd restart
测试:
cd /home/abcd
(/tftpboot 下存放文件zImage)
tftp 192.168.2.111
tftp> get zImage
Received 927676 bytes in 0.3 seconds
然后我又在根目录下进行测试:
cd /
tftp 192.168.2.111
tftp>get zImage
tftp: zImage: Permission denied
这是怎么回事?
[问题]ubuntu8.04 中TFTP配置出现的问题
-
- 帖子: 1
- 注册时间: 2007-10-15 12:43
- 快闪
- 帖子: 11
- 注册时间: 2008-05-09 8:00
- 来自: tianjin
- weilichun
- 帖子: 218
- 注册时间: 2007-09-09 15:41
- 来自: Beijing
- 联系:
-
- 帖子: 3
- 注册时间: 2008-10-08 22:08
Re: [问题]ubuntu8.04 中TFTP配置出现的问题
我今天也是出现错误,
看到一个文档里的,写的
安装程序会在/etc/inetd.conf中添加一行:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
但我们用xinetd而不是inetd,可以通过itox将inetd.conf项转换为xinetd的格式
输入命令:
$ itox -daemon_dir /usr/sbin < /etc/inetd.conf
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /srv/tftp
}
这其中的
server_args = /srv/tftp
而我们在建立tftp服务文件目录却是
“sudo mkdir /tftpboot”
因此只要把上面的“ server_args = /srv/tftp”改成
server_args = -s /tftpboot
总结下,所用到的命令
$ sudo vim /etc/inetd.conf
server_args = " "(你自己设置的路径tftpboot)
保存inetd.conf
再
sudo /etc/init.d/xinetd restart (这个不要忘掉)
看到一个文档里的,写的
安装程序会在/etc/inetd.conf中添加一行:
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
但我们用xinetd而不是inetd,可以通过itox将inetd.conf项转换为xinetd的格式
输入命令:
$ itox -daemon_dir /usr/sbin < /etc/inetd.conf
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /srv/tftp
}
这其中的
server_args = /srv/tftp
而我们在建立tftp服务文件目录却是
“sudo mkdir /tftpboot”
因此只要把上面的“ server_args = /srv/tftp”改成
server_args = -s /tftpboot
总结下,所用到的命令
$ sudo vim /etc/inetd.conf
server_args = " "(你自己设置的路径tftpboot)
保存inetd.conf
再
sudo /etc/init.d/xinetd restart (这个不要忘掉)
-
- 帖子: 2
- 注册时间: 2012-02-10 13:34
Re: [问题]ubuntu8.04 中TFTP配置出现的问题
我想问一下,ubuntu上配置tftp后,put get文件都出现transfer timeout的情况,我没有开启防火墙,这可能是什么原因造成的?