[root@host2
test
]
[root@host2
test
]
[root@host2
test
]
[root@host2
test
]
[root@host2
test
]
Connected to 192.168.0.142 (192.168.0.142).
220 (vsFTPd 2.2.2)
Name (192.168.0.142:root):
ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system
type
is UNIX.
Using binary mode to transfer files.
ftp
>
cd
pub
250 Directory successfully changed.
ftp
> put
/root/test/test
.txt
local
:
/root/test/test
.txt remote:
/root/test/test
.txt
227 Entering Passive Mode (192,168,0,142,140,140).
550 Permission denied.
ftp
> quit
221 Goodbye.
//
直接安装起服务,使用匿名登录后,上传文件会提示拒绝访问,这时我们需要修改一些文件
[root@host2
test
]
allow_ftpd_anon_write --> off
allow_ftpd_full_access --> off
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> off
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
[root@host2
test
]
[root@host2
test
]
[root@host2
test
]
[root@host2
test
]
getsebool -a |
grep
ftp
allow_ftpd_anon_write --> on
allow_ftpd_full_access --> on
allow_ftpd_use_cifs --> off
allow_ftpd_use_nfs --> off
ftp_home_dir --> on
ftpd_connect_db --> off
ftpd_use_fusefs --> off
ftpd_use_passive_mode --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_use_cifs --> off
tftp_use_nfs --> off
[root@host2 ]
anon_mkdir_write_enable=YES
//
匿名可创建目录
anon_other_write_enable=YES
//
匿名删除,重命名
anon_upload_enable=YES
//
匿名用户是否可以上传文件
[root@host2 ]
[root@host2
ftp
]
[root@host2
ftp
]
mkdir
ftp_test
[root@host2
ftp
]
chown
ftp
:root ftp_test
//
修改用户属主