今天在板子上使用 tftp -p -l sysenv.cfg 192.168.0.46命令想要将板子上的sysenv.cfg文件上传到host的tftp目录时,出现
tftp: server says: Access violation的错误提示,
以下内容转自:http://hi.baidu.com/babysnow/item/5b1587e797eaa30f8d3ea8ca
求助于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