[问题]ubuntu8.04 中TFTP配置出现的问题

内核编译和嵌入式产品的设计与开发
回复
xiaobai
帖子: 1
注册时间: 2007-10-15 12:43

[问题]ubuntu8.04 中TFTP配置出现的问题

#1

帖子 xiaobai » 2008-08-31 10:13

我用的是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
这是怎么回事?
头像
快闪
帖子: 11
注册时间: 2008-05-09 8:00
来自: tianjin

#2

帖子 快闪 » 2008-09-01 23:31

没有用户权限,换root试试,还有你那个内核镜像应该是在root下编的,
$su root
password
#chmod 777 zImage
再试试
supershz
帖子: 1
注册时间: 2008-09-03 15:55

#3

帖子 supershz » 2008-09-03 15:56

sudo tftp 192.168....
头像
weilichun
帖子: 218
注册时间: 2007-09-09 15:41
来自: Beijing
联系:

Re: [问题]ubuntu8.04 中TFTP配置出现的问题

#4

帖子 weilichun » 2008-10-04 15:31

代码: 全选

cd /
进入根目录了,你没有根目录的写入权限

代码: 全选

cd /tmp
....
Smilerzzy
帖子: 3
注册时间: 2008-10-08 22:08

Re: [问题]ubuntu8.04 中TFTP配置出现的问题

#5

帖子 Smilerzzy » 2008-10-20 23:32

我今天也是出现错误,

看到一个文档里的,写的

安装程序会在/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 (这个不要忘掉)
liangxiaxu
帖子: 2
注册时间: 2012-02-10 13:34

Re: [问题]ubuntu8.04 中TFTP配置出现的问题

#6

帖子 liangxiaxu » 2012-02-10 16:17

我想问一下,ubuntu上配置tftp后,put get文件都出现transfer timeout的情况,我没有开启防火墙,这可能是什么原因造成的?
回复