主题 : 请问ftp用账号plg连接smart210读取目录列表失败 复制链接 | 浏览器收藏 | 打印
级别: 新手上路
UID: 45817
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
综合积分: 72 分
注册时间: 2011-05-08
最后登录: 2017-03-19
楼主  发表于: 2013-12-15 10:29

 请问ftp用账号plg连接smart210读取目录列表失败

客户端是Filezilla,以下是root和plg账号消息日志,root账号能列出目录:

状态:    正在连接 192.168.1.230:21...
状态:    连接建立,等待欢迎消息...
响应:    220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
命令:    USER root
响应:    331 Password required for root.
命令:    PASS ***
响应:    230 User root logged in.
状态:    服务器不支持非 ASCII 字符。
状态:    已连接
状态:    读取目录列表...
命令:    PWD
响应:    257 "/" is current directory.
命令:    TYPE I
响应:    200 Type set to I.
命令:    PASV
响应:    227 Entering Passive Mode (192,168,1,230,178,221)
命令:    LIST -a
响应:    150 Opening BINARY mode data connection for '/bin/ls'.
响应:    226 Transfer complete.
状态:    列出目录成功
状态:    已从服务器断开
状态:    正在连接 192.168.1.230:21...
状态:    连接建立,等待欢迎消息...
响应:    220 FriendlyARM FTP server (Version 6.4/OpenBSD/Linux-ftpd-0.17) ready.
命令:    USER plg
响应:    331 Password required for plg.
命令:    PASS ***
响应:    230 User plg logged in.
状态:    服务器不支持非 ASCII 字符。
状态:    已连接
状态:    读取目录列表...
命令:    PWD
响应:    257 "/home/plg" is current directory.
命令:    TYPE I
响应:    200 Type set to I.
命令:    PASV
响应:    425 Can't open passive connection: Permission denied.
命令:    PORT 192,168,1,1,206,49
响应:    200 PORT command successful.
命令:    LIST
错误:    连接超时
错误:    读取目录列表失败


该怎么解决?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
1楼  发表于: 2013-12-15 11:19
响应:    425 Can't open passive connection: Permission denied.

试试换成Active的传输模式?
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 45817
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
综合积分: 72 分
注册时间: 2011-05-08
最后登录: 2017-03-19
2楼  发表于: 2013-12-15 11:29

 回 1楼(kasim) 的帖子

换到active模式之后,root和plg账号都不能列出目录了,看了原因就是因为plg账号不支持passive模式.
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
3楼  发表于: 2013-12-15 12:39

 Re:回 1楼(kasim) 的帖子

引用第2楼sagas于2013-12-15 11:29发表的 回 1楼(kasim) 的帖子 :
换到active模式之后,root和plg账号都不能列出目录了,看了原因就是因为plg账号不支持passive模式.

两种模式都不支持?那麻烦大了
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 45817
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
综合积分: 72 分
注册时间: 2011-05-08
最后登录: 2017-03-19
4楼  发表于: 2013-12-15 15:51

 回 3楼(kasim) 的帖子

可是root账号passive模式是对的,请看日志,会不会busybox有网络防火墙之类的东西?
[ 此帖被sagas在2013-12-15 15:59重新编辑 ]
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
5楼  发表于: 2013-12-15 17:04

 Re:回 3楼(kasim) 的帖子

引用第4楼sagas于2013-12-15 15:51发表的 回 3楼(kasim) 的帖子 :
可是root账号passive模式是对的,请看日志,会不会busybox有网络防火墙之类的东西?

我觉得更可能是/home/plg的权限问题。你可以在开发板上用ls -l /home看看
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 45817
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
综合积分: 72 分
注册时间: 2011-05-08
最后登录: 2017-03-19
6楼  发表于: 2013-12-15 21:35

 回 5楼(kasim) 的帖子

两个目录属性如下:

drwxr-xr-x    1 root     root          2048 Dec 30  2010 home
drwxr-xr-x    1 plg      500           2048 Dec 30  2010 plg

这个目录属性有啥问题没?
*無鈳取玳
级别: 论坛版主
UID: 27
精华: 12
发帖: 5398
金钱: 40120 两
威望: 17929 点
综合积分: 11036 分
注册时间: 2008-01-16
最后登录: 2014-11-22
7楼  发表于: 2013-12-15 21:44

 Re:回 5楼(kasim) 的帖子

引用第6楼sagas于2013-12-15 21:35发表的 回 5楼(kasim) 的帖子 :
两个目录属性如下:

drwxr-xr-x    1 root     root          2048 Dec 30  2010 home
drwxr-xr-x    1 plg      500           2048 Dec 30  2010 plg

.......

看起来没有什么问题。下次我也试试。
"If you have an apple and I have an apple and we exchange apples, then you and I will
still each have one apple. But if you have an idea and I have an idea and we exchange
these ideas, then each of us will have two ideas."
级别: 新手上路
UID: 45817
精华: 0
发帖: 36
金钱: 180 两
威望: 36 点
综合积分: 72 分
注册时间: 2011-05-08
最后登录: 2017-03-19
8楼  发表于: 2013-12-15 21:58
我烧写的是rootfs_rtm210.img,里面没有ftpd,是从rootfs_qtopia_qt4.img提取的.