【运维小能手】FTP用户权限问题导致无法备份MA5600T的配置文件
|
问题题描述 某运营商运维员工第一次维护ma5600t产品,需要周期性的备份ma5600t的data和configuration文件,但使用ftp配置backup不成功。 告警信息 backing up files fails from the host to the maintenance terminal 处理过程 1、在ma5600t上执行命令: ma5600t#display ftp username : anonymous userpass : ****** 发现此用户为系统默认用户,将其更改为客户定义的用户test: ma5680t(config)#ftp set user name(<=40 chars):test user password(<=40 chars): 检查ftp user是否修改正确: ma5600t#display ftp username : test userpass : ****** 更改ftp user后,备份仍然失败。 2、在ma5600t上执行命令: ma5600t#ping 192.168.246.133 reply from 192.168.246.133: bytes=56 sequence=1 ttl=128 time=1 ms ...... ma5600t#telnet 192.168.246.133 21 press ctrl_] to quit telnet mode trying 192.168.246.133 ... connected to 192.168.246.133 ...220 serv-u ftp server v4.0 for winsock ready... 530 not logged in. 221 goodbye! 从这些命令返回结果看,ma5600t和ftp server的网络是通的,应用层的端口访问也没有问题。 3、通过命令检查其ftp user用户是否权限不足。 设置用户的pc的ip地址跟ma5600t的维护ip地址同网段,在用户pc上执行cmd命令: d:\>ftp 192.168.246.133 //在windows命令行下执行ftp测试操作 connected to 192.168.246.133. 220 serv-u ftp server v4.0 for winsock ready... user (192.168.246.133 none)): test //输入ftp user用户名331 user name okay, need password. password: //输入密码 230 user logged in, proceed. //用户名和密码通过 ftp> put //put表示上传命令 local file d:\123.txt //在d盘目录下新建一个123.txt用于测试 remote file 999.txt //上传到目标目录下形成的文件名,可以建立新的,如果不设置,就沿用123.txt文件名 200 port command successful. //端口是ok的 550 permission denied. //但是操作被拒绝,返回550错误 ftp> quit 从返回的550错误可以确定是用户权限问题,根据事实,客户重新确认其ftp server设置,发现这个test用户没有加上写权限。 4、重新给这个ftp user加上“写write”权限并重启ftp server。在用户pc上执行cmd命令: d:\>ftp 192.168.246.133 connected to 192.168.246.133. 220 serv-u ftp server v4.0 for winsock ready... user (192.168.246.133 none)): test331 user name okay, need password. password: 230 user logged in, proceed. ftp> put local file d:\123.txt remote file 999.txt 200 port command successful. 150 opening ascii mode data connection for 999.txt. 226 transfer complete. //测试成功! ftp> quit 221 goodbye! 5、重新登录ma5600t设备,执行命令: ma5600t#backup configuration ftp 192.168.246.133 ma5600t# backing up files is successful from the host to the maintenance terminal 备份显示“successful”,备份成功,问题解决。 根因 1、ftp 功能使用有误。 因为ma5600t的ftp只有客户端client的功能,不具备ftp server功能,且在缺省情况下,系统默认ftp用户名为anonymous,密码为anonymous@huawei.com。 2、ftp server通讯失败。 如果ma5600t与ftp server的网络不通,也会导致备份失败。 3、ftp server用户错误。 如果在ma5600t上使用的ftp user在ftp server上没有建立,也会导致备份失败。 4、ftp server用户权限不足。 backup属于备份操作,需要上传文件到ftp server的文件目录上,需要这个ftp user有“读read”和“写write”的权限,如果权限不足,也会导致备份失败。 建议与总结 1、备份ma5600t的data或者configuration文件是日常升级和维护的基本手段,很多时候,我们都采用tftp方式,但某些客户为了安全和其他要求,需要采用ftp方式备份,此文给出了ma5600t上ftp的操作、维护和检测的命令行和分析方法。 2、经过测试,此方法对接入网的msan/ua5000等产品同样适用。 |

none)): test //输入ftp user用户名
Favorite (0)