给oracle用户赋上传ftp权限,gssftp 上传出现权限拒绝问题(553 文件: Permission denied)...

主机 centos5.1

ftp:gssftp

远程主机一样环境

gssftp里修改为如下:

service ftp

{

flags           = REUSE

socket_type     = stream

wait            = no

user            = root

server          = /usr/kerberos/sbin/ftpd

server_args     = -l

log_on_failure  += USERID

disable         = no

}

测试如下:

1直接根目录传

ftp> pwd

257 "/" is current directory.

ftp> put /1t

local: /1t remote: /1t

227 Entering Passive Mode (172,16,4,179,134,188)

553 /1t: Permission denied.

2传到另一主机/tmp下

226 Transfer complete.

ftp> pwd

257 "/tmp" is current directory.

ftp> put /oracle.tar

local: /oracle.tar remote: /oracle.tar

227 Entering Passive Mode (172,16,4,179,198,221)

553 /oracle.tar: Permission denied.

3在/tmp/下传到另一主机的/tmp/下

ftp> put /tmp/1t

local: /tmp/1t remote: /tmp/1t

227 Entering Passive Mode (172,16,4,179,149,202)

150 Opening BINARY mode data connection for /tmp/1t.

226 Transfer complete.

5 bytes sent in 0.0003 seconds (16 Kbytes/s)

开始以为(root用户登录)ftp上传以ftp用户读取文件再传送

如下测试:

[root@yao1 /]# ll

total 162

-rw-r--r--   1 ftp    ftp          5 May 13 14:27 1t

drwxr-xr-x   2 root   root      4096 May 12 09:53 bin

ftp> put /1t

local: /1t remote: /1t

227 Entering Passive Mode (172,16,4,179,152,62)

553 /1t: Permission denied.

ftp> pwd

257 "/" is current directory.

ftp> cd /tmp

250 CWD command successful.

ftp> pwd

257 "/tmp" is current directory.

ftp> put /1t

local: /1t remote: /1t

227 Entering Passive Mode (172,16,4,179,183,198)

553 /1t: Permission denied.

结果是:linux gssftp上传不能传/目录上的文件

晚上又测试了:

结果如下

Remote system type is UNIX.

Using binary mode to transfer files.

ftp> put /1t /tmp/1t

local: /1t remote: /tmp/1t

227 Entering Passive Mode (172,16,4,179,48,36)

150 Opening BINARY mode data connection for /tmp/1t.

226 Transfer complete.

6 bytes sent in 0.00028 seconds (21 Kbytes/s)

说明只要上传后的路径有绝对路径和文件名一定行的。如上面的我设上传路径和文件名为/tmp/1t就ok了。

所以gssftp只要put 之后源地址 目标地址正确,不要缺省的认为你ftp后用cd 进入目录,然后和windows一样put  在源文件之后一定放在刚才你cd进来的目录,linux 这个上传需要设置目标地址的绝对路径,不是你cd进入一个目录就行。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值