<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[沧海一粟]]></title> 
<link>http://www.dzhope.com/index.php</link> 
<description><![CDATA[Web系统架构与服务器运维,php开发]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[沧海一粟]]></copyright>
<item>
<link>http://www.dzhope.com/post//</link>
<title><![CDATA[linux限定FTP用户目录,充许ROOT用户FTP等]]></title> 
<author>jed &lt;jed521@163.com&gt;</author>
<category><![CDATA[服务器技术]]></category>
<pubDate>Thu, 05 Mar 2009 01:50:19 +0000</pubDate> 
<guid>http://www.dzhope.com/post//</guid> 
<description>
<![CDATA[ 
	系统环境：RedHat 9 (内核：linux-2.4.20-8)<br/>FTP版本：vsftpd-1.1.3-8<br/>实验需要：配置FTP服务器，匿名用户能够访问，上传、下载文档。<br/>具体步骤如下：<br/>（1）编辑/etc/vsftpd/vsftpd.conf需要修改以下几段配置命令，去掉前面的#号。<br/>Anonymous_enable = YES&nbsp;&nbsp; 允许匿名用户访问<br/>Anon_upload_enable = YES&nbsp;&nbsp; 允许匿名用户上传<br/>Anon_mkdir_write_enable = YES&nbsp;&nbsp;允许匿名用户创建文档<br/>Anon_uploads = YES&nbsp;&nbsp;&nbsp;&nbsp;允许用户上传<br/>在最后加上，以下几段代码<br/>anon_other_write_enable = YES<br/>anon_umask = 077或777&nbsp;&nbsp;改变文档的权限<br/>（2）启动FTP服务<br/>#/etc/rc.d/init.d/vsftd start<br/>实验中碰到的问题<br/>1．&nbsp;&nbsp;访问不了<br/>注意是否关闭了防火墙，service iptables stop<br/>2．&nbsp;&nbsp;能上传但不能下载<br/>&nbsp;&nbsp; 去掉chown_upload = YES前面的#，然后在最后增加anon_umask = 077的文档权限<br/>3．&nbsp;&nbsp;没有写的权限<br/>#chmod 777 /var/ftp/pub<br/>怎样让root用户FTP<br/>/etc/vsftpd.ftpusers和/etc/vsftpd.user_list中将root用户加上#号<br/>怎样限定FTP用户的目录.<br/>默认情况下ftp用户能够浏览任意目录,这样不安全.能够LINUX用户在FTP后只进入自己的主目录<br/>以vsftp为例:<br/>1.修改主目录能够通过usermod命令修改;当然直接修改passwd中的定义也是能够的.但是不建议这样操作.<br/>2. 修改config文档中下面的语句:<br/>chroot_local_user=YES; # Uncomment to put local users in a chroot() jail in their home directory after login.<br/>chroot_list_file=/etc/vsftpd.chroot_list; 在该文档中,定义不能改变目录的用户. <br/><br/><br/>Tags - <a href="http://www.dzhope.com/tags/linux/" rel="tag">linux</a> , <a href="http://www.dzhope.com/tags/ftp/" rel="tag">ftp</a> , <a href="http://www.dzhope.com/tags/linuxftp/" rel="tag">linuxftp</a> , <a href="http://www.dzhope.com/tags/vsftp/" rel="tag">vsftp</a> , <a href="http://www.dzhope.com/tags/ftp%25E6%259C%258D%25E5%258A%25A1%25E5%2599%25A8/" rel="tag">ftp服务器</a>
]]>
</description>
</item><item>
<link>http://www.dzhope.com/post//#blogcomment</link>
<title><![CDATA[[评论] linux限定FTP用户目录,充许ROOT用户FTP等]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.dzhope.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>