免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 8730 | 回复: 12
打印 上一主题 下一主题

ftp permission denied [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-01-20 09:33 |只看该作者 |倒序浏览
230 User root logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bin
200 Type set to I.
ftp> get prtdiag
prtdiag: Permission denied

# ls -l prtdiag
-rwxrwxrwx   1 root     other       3588 Jan 20 06:39 prtdiag


我想从这台机器上ftp下载prtdiag文件,但显示permission denied,请问如何解决?

论坛徽章:
0
2 [报告]
发表于 2009-01-20 09:47 |只看该作者

我的理解

看一下 /etc/ftpusers 的配置情况

论坛徽章:
0
3 [报告]
发表于 2009-01-20 10:48 |只看该作者
我觉得root都能登录了应该不是这个问题,看下/etc/ftpd/ftpaccess 对root从ftp登录是不是能在bin下面做操作

论坛徽章:
0
4 [报告]
发表于 2009-01-20 11:03 |只看该作者
# more /etc/ftpd/ftpaccess
# ident "@(#)ftpaccess  1.1     01/06/26 SMI"
#
# FTP server configuration file, see ftpaccess(4).
#

class           realusers       real            *
class           guestusers      guest           *
class           anonusers       anonymous       *

loginfails      3
passwd-check    trivial         warn
private         no
keepalive       yes
shutdown        /etc/ftpd/shutdown.msg

# email         user@hostname
# guestuser     username
# timeout       idle            300

banner          /etc/ftpd/banner.msg
greeting        brief
message         /etc/ftpd/welcome.msg   login
message         .message                cwd=*
readme          README*                 login
readme          README*                 cwd=*

chmod           no              anonymous
delete          no              anonymous
overwrite       no              anonymous
rename          no              anonymous
umask           no              anonymous

compress        yes             realusers guestusers anonusers
tar             yes             realusers guestusers anonusers

path-filter     guest,anonymous /etc/ftpd/filename.msg  ^[[:alnum:]._-]*$ ^[.-]

noretrieve      relative        class=anonusers         /
allow-retrieve  relative        class=anonusers         /pub

upload          class=anonusers    *    *         no  nodirs
# upload        class=anonusers    *    /incoming yes ftpadm ftpadm 0440 nodirs

# log           commands        real,guest,anonymous
# log           security        real,guest,anonymous
# log           transfers       real,guest,anonymous    inbound,outbound

# limit-time    anonymous       30
# limit         anonusers       10      Wk0730-1800       /etc/ftpd/toomany.msg
# limit         anonusers       50      SaSu|Any1800-0730 /etc/ftpd/toomany.msg
#

论坛徽章:
0
5 [报告]
发表于 2009-01-20 11:35 |只看该作者
后来想了一下, 感觉确实应该像alex说的,root 能登录就应该可以下载了

在自己的机器上试了一下,

#ls -l /usr/sbin/prtdiag
-r-xr-xr-x 4 root bin  512

我用pc 机以root 登录到了 远程 ftp server (solaris), 使用了 bin 模式 成功传输到本地, 看到prtdiag 是一个script

论坛徽章:
0
6 [报告]
发表于 2009-01-20 14:31 |只看该作者
问题是我还是不行啊

论坛徽章:
0
7 [报告]
发表于 2009-01-20 17:16 |只看该作者
1.如果你用ftp工具呢?
2.ftp> get prtdiag
prtdiag: Permission denied

你这个get到哪里呢?

论坛徽章:
0
8 [报告]
发表于 2009-01-20 17:24 |只看该作者
是不是本地没写入权限?

ftp>lcd

看看lcd显示的路径是否有写入权限

论坛徽章:
0
9 [报告]
发表于 2009-01-20 21:58 |只看该作者
我是从windows机器上先ssh登入到一台Sun Fire V120,是以普通用户名kelly登入的.
bash-2.05$ pwd
/export/home/kelly

然后再从Sun Fire V120 ftp 到一台Sun netra-210, 以root进入,get的时候便发生上述情况。

很有可能是kelly用户的权限限制,但我又分析不出具体少了什么权限:
在v120上:

bash-2.05$ pwd
/export/home/kelly
bash-2.05$ ls -l
total 6
-rw-r--r--   1 4742     remote       136 May 19  2008 local.cshrc
-rw-r--r--   1 4742     remote       157 May 19  2008 local.login
-rw-r--r--   1 4742     remote       174 May 19  2008 local.profile
bash-2.05$ cd ..
bash-2.05$ ls -ld kelly
drwxr-xr-x   2 4742     remote       512 May 19  2008 kelly
bash-2.05$

论坛徽章:
0
10 [报告]
发表于 2009-01-20 22:00 |只看该作者
看看/etc/shells是否遗漏了什么?
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP