安装CmapTools v5.03

tftp 使用记录

王者归来 posted @ 2010年1月21日 19:41 in ubuntu with tags tftp , 1698 阅读

安装tftp可参考:

https://linuxlink.timesys.com/docs/linux_tftp

简要过程如下:

1. 安装

# apt-get install xinetd tftpd

2. 确保/etc/services中的tftp存在,且没有被注释掉

tftp            69/tcp
tftp            69/udp

3. 在/etc/xinetd.d下创建名为tftp的文件,

内容如下:

# default: off
# description: The tftp server serves files using the Trivial File Transfer \
#    Protocol.  The tftp protocol is often used to boot diskless \
#    workstations, download configuration files to network-aware printers, \
#    and to start the installation process for some operating systems.
service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot
    disable         = yes
}

4. 重启xinetd

# /etc/init.d/xinetd restart

5. 测试tftp服务器

# echo "Hello, embedded world" > /tftpboot/hello.txt"
# tftp localhost
tftp> get hello.txt
Received 23 bytes in 0.1 seconds
tftp> quit 

6. 注意事项

如果从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
 

s19j pro 说:
2025年4月12日 04:07

I am glad to read your blog. your blog is really awesome and cool. your blog is really great and cool. thanks for sharing the nice and cool post First of all let me tell you, you have got a great blog .I am interested in looking for more of such topics and would like to have further information

fknapredak 说:
2025年4月12日 15:23

I consider something genuinely interesting about your web blog so I saved to bookmarks .

totocri 说:
2025年4月12日 15:24

I hope we can have additional weapons slots now that different weapons are needed for different cases.

get more info 说:
2025年4月12日 15:26

Hey There. I found your weblog using msn. This is an extremely smartly written article. I’ll be sure to bookmark it and return to learn extra of your helpful information. Thanks for the post.

get more info 说:
2025年4月12日 15:29

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much.

check here 说:
2025年4月12日 15:29

You’ve got some interesting points in this article. I would have never considered any of these if I didn’t come across this. Thanks!.

website 说:
2025年4月12日 15:33

I invite you to the page where you can readwith interesting information on similar topics.

Learn more 说:
2025年4月12日 15:35

Your website is nothing short of impressive, and Im very grateful for it. The way you present ideas

website 说:
2025年4月12日 15:36

What a fantabulous post this has been. Never seen this kind of useful post. I am grateful to you and expect more number of posts like these. Thank you very much.

website 说:
2025年4月12日 15:38

Design and implementation of interior decoration, which includes parts such as design, construction and implementation of kitchen cabinets, wardrobes, Corian plates, Marmonite, granite sinks, residential, office and commercial renovation.

먹튀검증 说:
2025年4月12日 15:41

Excellent blog! Do you have any recommendations for aspiring writers? I’m planning to start my own b

라타 说:
2025年4月12日 15:43

It's always exciting to read articles from other writers and practice something from their web sites.

Learn more 说:
2025年4月12日 21:33

I’m going to read this. I’ll be sure to come back. thanks for sharing. and also This article gives the light in which we can observe the reality. this is very nice one and gives indepth information

토토매거진 说:
2025年4月12日 21:35

Your website is nothing short of impressive, and Im very grateful for it. The way you present ideas

click here 说:
2025年4月12日 21:37

Your website is nothing short of impressive, and Im very grateful for it. The way you present ideas

get more info 说:
2025年4月12日 21:41

So it is interesting and very good written and see what they think about other people.

get more info 说:
2025年4月12日 21:43

my own blog and would like to find out where u got this from. I look forward to your kind cooperation

website 说:
2025年4月12日 21:45

So it is interesting and very good written and see what they think about other people.

elgustoesnuestro20 说:
2025年4月12日 21:46

This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post.

토토마트 说:
2025年4月12日 21:48

Hello, I have browsed most of your posts. This post is probably where I got the most useful information for my research. Thanks for posting, maybe we can see more on this. Are you aware of any other websites on this subject.

website 说:
2025年4月12日 23:25

I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work...

Find out 说:
2025年4月12日 23:25

This type of message always inspiring and I prefer to read quality content, so happy to find good place to many here in the post, the writing is just great, thanks for the post.

Find out 说:
2025年4月12日 23:26

I have not a lot of information about it but I have got an extra unique info in your unique post.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter