免费注册 查看新帖 |

Chinaunix

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

[FTP] rhel3/4 vsftpd默认安装VSFTPD,怎么实现FTP上传下载呢? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-04-12 10:21 |只看该作者 |倒序浏览
看了好多文章,也不得要领
redhat enterprise linux3/4安装系统选择了vsftpd,似乎版本有点老,
/etc/vsftpd/vsftpd.conf
/var/ftp/pub
看了好多文章,有时能实现ftp用户访问,只能下载,不能上传.
偶对vsftpd很菜,不知道哪位大侠能给说个特别简单明确的步骤:
1
2
3
可以不? 谢谢!!

论坛徽章:
0
2 [报告]
发表于 2006-04-12 10:35 |只看该作者
再次重装redhat linux 3,选择了ftp server
最原始的一张白纸,怎么实现FTP上传 下载呢?
多谢啦!

论坛徽章:
0
3 [报告]
发表于 2006-04-12 10:46 |只看该作者
1 关闭防火墙
2 vsftpd设置为自动启动
3 以ftp用户匿名访问,可以下载,不可以上传

ftp> get 1.txt
200 PORT command successful. Consider using PASV.
150 Opening BINARY mode data connection for 1.txt (8 bytes).
226 File send OK.
ftp: 收到 8 字节,用时 0.00Seconds 8000.00Kbytes/sec.
ftp> put 1.txt
200 PORT command successful. Consider using PASV.
550 Permission denied.

论坛徽章:
0
4 [报告]
发表于 2006-04-12 11:15 |只看该作者

修改/etc/vsftpd/vsftpd.conf

### General ###
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
ls_recurse_enable=YES
tcp_wrappers=YES
xferlog_enable=YES
dirmessage_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES

### Users & Permissions ###
local_enable=YES
ftp_username=ftpadmin /* 实际此处修改为ftp*/
anonymous_enable=YES
anon_upload_enable=YES
chown_uploads=YES
chown_username=ftpadmin  /* 实际此处修改为ftp*/
local_umask=002
anon_umask=007
file_open_mode=0666
write_enable=YES
nopriv_user=ftp

此时报错:
553 could not create  file

论坛徽章:
0
5 [报告]
发表于 2006-04-12 12:07 |只看该作者
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=002
anon_upload_enable=YES
anon_mkdir_write_enable=YES
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=ftp
xferlog_std_format=YES
#nopriv_user=ftpsecure
#async_abor_enable=YES
#chroot_list_file=/etc/vsftpd.chroot_list
pam_service_name=vsftpd
userlist_enable=YES
listen=YES
tcp_wrappers=YES
ftp_username=ftp
anon_umask=007
file_open_mode=0666
ls_recurse_enable=YES
nopriv_user=ftp

论坛徽章:
0
6 [报告]
发表于 2006-04-12 12:42 |只看该作者
哪位老大,指点下?

论坛徽章:
0
7 [报告]
发表于 2006-04-12 13:41 |只看该作者

这个也看不懂~!:(

Article Reference
Article ID: 2796
Last update: 09-30-05 Issue:
How do I configure vsftpd to set permissions on anonymous uploads? Resolution:Using the vsftp service provided by the configuration file below, all anonymously uploaded files end up owned by ftpadmin with read/write permission for the owner only.

Sample /etc/vsftpd/vsftpd.conf

### General ###
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
ls_recurse_enable=YES
tcp_wrappers=YES
xferlog_enable=YES
dirmessage_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES

### Users & Permissions ###
local_enable=YES
ftp_username=ftpadmin
anonymous_enable=YES
anon_upload_enable=YES
chown_uploads=YES
chown_username=ftpadmin  
local_umask=002
anon_umask=007
file_open_mode=0666
write_enable=YES
nopriv_user=ftp


vsftpd is ignoring the anon_umask parameter because of the chown_uploads=YES option. vsftpd cannot apply the anon_umask because the upload ownership permissions are overwritten (by chmod) and uploads are no longer anonymous.

At the time of this writing, the local_umask parameter seems to have no effect. This is probably a missing feature or a borderline bug. As a work-around, try setting the chown_uploads parameter to NO and commenting out the chown_username line. This should allow the anon_umask to have the desired effect on permissions of files uploaded by anonymous users.

论坛徽章:
0
8 [报告]
发表于 2006-04-13 23:28 |只看该作者
怎么没人回呢?
cd /etc/
ls vsftpd*
vi vsftpd.ftpusers
vi vsftpd.user_list
把ROOT注释掉了
root就可以登陆了,遇到一个网管告诉我的,唉!
大侠们?!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP