<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Vegetable garden</title>
	<atom:link href="http://venushuang.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://venushuang.wordpress.com</link>
	<description>Venus&#039;s weblog</description>
	<lastBuildDate>Fri, 30 Apr 2010 03:14:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='venushuang.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vegetable garden</title>
		<link>http://venushuang.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://venushuang.wordpress.com/osd.xml" title="Vegetable garden" />
	<atom:link rel='hub' href='http://venushuang.wordpress.com/?pushpress=hub'/>
		<item>
		<title>WebDAV + Mysql + quota or WebDAV + .htacess +quota</title>
		<link>http://venushuang.wordpress.com/2010/04/26/webdav-install-on-centos/</link>
		<comments>http://venushuang.wordpress.com/2010/04/26/webdav-install-on-centos/#comments</comments>
		<pubDate>Mon, 26 Apr 2010 01:35:03 +0000</pubDate>
		<dc:creator>venushuang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Configurations]]></category>

		<guid isPermaLink="false">http://venushuang.wordpress.com/?p=40</guid>
		<description><![CDATA[WebDav is a set of extensions to the Hypertext Transfer Protocol (HTTP) that allows users to collaboratively edit and manage files on remote World Wide Web servers. Now,follow below steps you can install WebDav. 1.Check have you enable mod_dav Command line input  httpd-M .If  dav_module (shared) you can found,it will support mod_dav . 2.Create webdav.cdnhub.conf [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=40&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>WebDav is a set of extensions to the Hypertext Transfer Protocol (HTTP) that allows users to collaboratively edit and manage files on remote World Wide Web servers.</p>
<p>Now,follow below steps you can install WebDav.</p>
<p>1.Check have you enable mod_dav</p>
<p>Command line input  httpd-M .If  dav_module (shared) you can found,it will support mod_dav .</p>
<p>2.Create webdav.cdnhub.conf in /etc/httpd/conf.d directory</p>
<p>&lt;IfModule mod_dav_fs.c&gt;</p>
<p>LimitXMLRequestBody 131072</p>
<p>Alias /cdnhub &#8220;/var/webdav/cdnhub.com&#8221;</p>
<p>CustomLog /var/log/httpd/cdnhub.com.access_log combined</p>
<p>&lt;Directory /var/webdav/cdnhub.com&gt;</p>
<p>Dav On</p>
<p>Options +Indexes</p>
<p>IndexOptions FancyIndexing</p>
<p>AddDefaultCharset UTF-8</p>
<p>AuthType Basic</p>
<p>AuthName &#8220;cdnhub.com WebDAV Server&#8221;</p>
<p>AuthUserFile /cdnhub.users.pwd</p>
<p>Require valid-user</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p>&lt;/IfModule&gt;</p>
<p>3.Create account for cdnhub.com</p>
<p>#htpasswd -c /cdnhub.users.pwd test</p>
<p>4.#chown -R apache.apache /var/webdav</p>
<p>#service httpd reload</p>
<p><strong>Enable WebDAV Quota function</strong></p>
<p>下载补丁包 http://www.geocities.jp/t_sat7/webdav/webdav.html<br />
请选择与Apache版本相应的patch，这里是非依存版本 webdav-2.2.3-quota-2.4any.txt。这个patch的作用是WebDAV模块能够提供限制配额的功能。</p>
<p># patch -p2 &lt; ~/webdav-2.2.3-quota-2.4any.txt</p>
<p>如果不起作用，下载符合你版本的Apache,重新编译，并把模块拷贝至原Apache Modules目录。</p>
<p>下载地址 http://archive.apache.org/dist/httpd/</p>
<p>#cd /root/httpd-2.2.3</p>
<p>#patch -p2 &lt; ~/webdav-2.2.3-quota-2.4any.txt</p>
<p>#./configure –enable-modules=most –enable-mods-shared=all –with-expat=builtin</p>
<p>#make</p>
<p>#mv /etc/httpd/modules/mod_dav.so mod_dav.so.default</p>
<p>#mv /etc/httpd/modules/mod_dav_fs.so mod_dav_fs.so.default</p>
<p>#cp modules/dav/fs/.libs/mod_dav_fs.so /etc/httpd/modules/</p>
<p>#cp modules/dav/main/.libs/mod_dav.so /etc/httpd/modules/</p>
<p>#service httpd reload</p>
<p>在配置文件webdav.cdnhub.conf 加上quota配置</p>
<p>DAVSATMaxAreaSize 150   //限制为150KB</p>
<p>#service httpd reload</p>
<p>再建立一个配置文件如 webdav.pacnet.conf 如下</p>
<p>&lt;IfModule mod_dav_fs.c&gt;</p>
<p>LimitXMLRequestBody 131072</p>
<p>Alias /pacnet &#8220;/var/www/webdav/pacnet.com&#8221;</p>
<p>CustomLog /var/log/httpd/pacnet.com.access_log combined</p>
<p>&lt;Directory /var/www/webdav/pacnet.com&gt;</p>
<p>Dav On</p>
<p>DAVSATMaxAreaSize 150</p>
<p>Options +Indexes</p>
<p>IndexOptions FancyIndexing</p>
<p>AddDefaultCharset UTF-8</p>
<p>AuthType Basic</p>
<p>AuthName &#8220;pacnet.com WebDAV Server&#8221;</p>
<p>AuthUserFile /pacnet.users.pwd</p>
<p>Require valid-user</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p>&lt;/IfModule&gt;</p>
<p><strong>至此，</strong><strong>WebDAV+Quota+.htaccess</strong><strong>配置完成，下面尝试用</strong><strong>WebDav+Mysql+Quota</strong><strong>来配置。</strong></p>
<p>Quota部分的配置如上，下面使用Mysql来替代.htacess</p>
<p>检查所安装的Mysql是否支持WebDAV</p>
<p>#rpm -qa | grep mod_auth_mysql</p>
<p>如未安装，请到http://sourceforge.net/下载或者执行yum安装</p>
<p>#yum install mod_auth_mysql</p>
<p>安装完成后，会在/etc/httpd/conf.d下有auth_mysql.conf</p>
<p>至此，WebDav已支持Mysql。</p>
<p>#mysqladmin -u root -p</p>
<p>建立数据库auth_apche</p>
<p>#mysql -u root -p</p>
<p>mysql &gt; create database auth_apache;</p>
<p>Query OK, 1 row affected (0.00 sec)</p>
<p>mysql&gt; show databases;</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>| Database           |</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>| information_schema |</p>
<p>| auth_apache        |</p>
<p>| mysql              |</p>
<p>| test               |</p>
<p>+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+</p>
<p>4 rows in set (0.00 sec)</p>
<p>mysql&gt; create table cdnhub ( username char(50) not null, passwd char(16) not null);</p>
<p>mysql&gt; insert into cdnhub (username,passwd) values (&#8216;test&#8217;,'cdnhub111111&#8242;);</p>
<p>mysql&gt; grant select on auth_apache.* to apache@localhost identified by &#8220;cdnhub2205&#8243;;</p>
<p>下面更改WebDav.cdnhub.conf配置如下</p>
<p>&lt;IfModule mod_dav_fs.c&gt;</p>
<p>LimitXMLRequestBody 131072</p>
<p>Alias /cdnhub &#8220;/var/www/webdav/cdnhub.com&#8221;</p>
<p>CustomLog /var/log/httpd/cdnhub.com.access_log combined</p>
<p>&lt;Directory /var/www/webdav/cdnhub.com&gt;</p>
<p>Dav On</p>
<p>DAVSATMaxAreaSize 150</p>
<p>Options +Indexes</p>
<p>IndexOptions FancyIndexing</p>
<p>AddDefaultCharset UTF-8</p>
<p>AuthType Basic</p>
<p>AuthName &#8220;cdn.com WebDAV Server&#8221;</p>
<p>#AuthUserFile /cdnhub.users.pwd</p>
<p>AuthMySQLEnable On</p>
<p>AuthMySQLHost localhost</p>
<p>AuthMySQLPort 3306</p>
<p>AuthMySQLUser  apache</p>
<p>AuthMySQLPassword cdnhub2205</p>
<p>AuthMySQLDB auth_apache</p>
<p>AuthMySQLUserTable cdnhub</p>
<p>AuthMySQLNameField username</p>
<p>AuthMySQLPasswordField passwd</p>
<p>AuthMySQLPwEncryption none</p>
<p>AuthMySQLAuthoritative On</p>
<p>Require valid-user</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p>&lt;/IfModule&gt;</p>
<p>至此，测试已可以使用Mysql去认证WebDav。</p>
<p>mod_auth_mysql参数说明  http://www.cgi101.com/book/ch20/mod_auth_mysql.html</p>
<p>#cp webdav.cdnhub.conf webdav.pacnet.conf</p>
<p>修改其中有关数据库配置，且在auth_apache中建立新表pacnet去控制/pacnet</p>
<p>webdav.pacnet.conf配置如下</p>
<p>&lt;IfModule mod_dav_fs.c&gt;</p>
<p>LimitXMLRequestBody 131072</p>
<p>Alias /cdnhub &#8220;/var/www/webdav/cdnhub.com&#8221;</p>
<p>CustomLog /var/log/httpd/pacnet.com.access_log combined</p>
<p>&lt;Directory /var/www/webdav/cdnhub.com&gt;</p>
<p>Dav On</p>
<p>DAVSATMaxAreaSize 150</p>
<p>Options +Indexes</p>
<p>IndexOptions FancyIndexing</p>
<p>AddDefaultCharset UTF-8</p>
<p>AuthType Basic</p>
<p>AuthName &#8220;cdn.com WebDAV Server&#8221;</p>
<p>#AuthUserFile /cdnhub.users.pwd</p>
<p>AuthMySQLEnable On</p>
<p>AuthMySQLHost localhost</p>
<p>AuthMySQLPort 3306</p>
<p>AuthMySQLUser  apache</p>
<p>AuthMySQLPassword cdnhub2205</p>
<p>AuthMySQLDB auth_apache</p>
<p>AuthMySQLUserTable pacnet</p>
<p>AuthMySQLNameField username</p>
<p>AuthMySQLPasswordField passwd</p>
<p>AuthMySQLPwEncryption none</p>
<p>AuthMySQLAuthoritative On</p>
<p>Require valid-user</p>
<p>Order allow,deny</p>
<p>Allow from all</p>
<p>&lt;/Directory&gt;</p>
<p>&lt;/IfModule&gt;</p>
<p>至此，使用Mysql去认证WebDAV完成。</p>
<p><strong>How access to WebDav on Windows/MAC OS X/Linux</strong></p>
<p><strong>Using Windows</strong></p>
<ul>
<li>On the desktop, double-click My Network Places.</li>
<li>In the “Network Tasks” pane, click Add a network place.</li>
<li>On the welcome screen, click Next.</li>
<li>Select Choose another network location, and then click Next.</li>
<li>In the “Internet or network address:” field, enter a URL that points to the destination Resources tool.</li>
</ul>
<p>To connect to a site’s Resources, enter the following URL: http://xx.xx.xx.xx/xx</p>
<p>You may now drag and drop files and folders between your computer and the sites to which you just connected. However, you cannot delete items from a site by dragging them to the Recycle Bin on your desktop. To delete an item, right-click it and select Delete.</p>
<p><strong>Using MAC OS X</strong></p>
<p>Click Finder &gt; From the Finder menu, select Go &gt; Connect to Server.</p>
<p>Type in the URL (e.g. http://xx.xx.xx.xx/xx), and press the + button to save it as a favourite. Finally, provide username and password.</p>
<p><strong>Using Linux</strong></p>
<p>Use GUI file manager.</p>
<p>KDE supports WebDAV by just using URLs that start with webdav:// or webdavs://. For e.g, open konqueror and type the url webdav:http://xx.xx.xx.xx/xx</p>
<p>The Gnome file browser Nautilus also has WebDAV support in recent versions, using normal URLs with http://. Open Nautilus and type the url http:// webdav:http://xx.xx.xx.xx/xx</p>
<p><strong>Command-line WebDAV client for Unix / Linux</strong></p>
<p>Use cadaver client, it supports file upload, download, on-screen display, namespace operations (move and copy), collection creation and deletion, and locking operations. Its operation is similar to the standard ftp client and the Samba Project’s smbclient. A user familiar with these tools should be quite comfortable with cadaver. cadaver supports automatically logging in to servers requiring authentication via a .netrc file (similar to ftp).</p>
<p>To onnect to webdav server, from a shell prompt enter:</p>
<table cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top"># cadaver http:// webdav://xx.xx.xx.xx/xx</td>
</tr>
</tbody>
</table>
<p><strong>In </strong>和<strong> Out</strong>的流量都会写进日志文件。<strong>/var/log/httpd/cdnhub.com.access_log<span id="more-40"></span><br />
</strong></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venushuang.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venushuang.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venushuang.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=40&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venushuang.wordpress.com/2010/04/26/webdav-install-on-centos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e97c4125cb573c68955f9192e8e40a3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venushuang</media:title>
		</media:content>
	</item>
		<item>
		<title>Squid cache manager setup</title>
		<link>http://venushuang.wordpress.com/2009/12/30/squid-cache-manager-setup/</link>
		<comments>http://venushuang.wordpress.com/2009/12/30/squid-cache-manager-setup/#comments</comments>
		<pubDate>Wed, 30 Dec 2009 03:44:06 +0000</pubDate>
		<dc:creator>venushuang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Configurations]]></category>

		<guid isPermaLink="false">http://venushuang.wordpress.com/2009/12/30/squid-cache-manager-setup/</guid>
		<description><![CDATA[The cache manager (cachemgr.cgi) is a CGI utility for displaying statistics about the squid process as it runs. The cache manager is a convenient way to manage the cache and view statistics without logging into the server. Reverse Proxy IP:192.168.1.100 Web Server with cachemgr IP:192.168.1.101 In Squid reverse proxy,edit /usr/local/squid/etc/squid.conf to allow the cache manager [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=23&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong><span style="font-family:Arial, 'Lucida Grande', sans-serif;font-weight:normal;line-height:14px;">The cache manager (<em>cachemgr.cgi</em>) is a CGI utility for displaying statistics about the <em>squid</em> process as it runs. The cache manager is a convenient way to manage the cache and view statistics without logging into the server.</span><br />
</strong></p>
<p><strong>Reverse Proxy</strong> IP:192.168.1.100</p>
<p><strong>Web Server with cachemgr</strong> IP:192.168.1.101</p>
<p>In Squid reverse proxy,edit /usr/local/squid/etc/squid.conf to allow the cache manager on web server to access</p>
<ul>
<li>add two lines and comment one line
<ul>
<li>acl myhttp src 192.168.1.101 127.0.0.1/32</li>
<li>http_access allow manager myhttp</li>
<li>#http_access allow manager localhost</li>
</ul>
</li>
<li>or add web server ip to localhost
<ul>
<li>acl localhost src 192.168.1.101 127.0.0.1/32</li>
</ul>
</li>
</ul>
<p>In Web Server</p>
<ul>
<li> If Squid is not installed on web server
<ul>
<li>#mkdir /usr/local/squid-cgi/ ##create a directory to store cachemgr.cgi</li>
<li>#cd /usr/local/squid-cgi/</li>
<li>#scp root@192.168.1.100:/xx/cachemgr.conf . ##copy achemgr.conf to squid-cgi</li>
<li>#chmod 755 cachemgr.cgi</li>
<li> Add reverse proxy ip to cachemgr.conf
<ul>
<li>192.168.1.100:80</li>
</ul>
</li>
<li><strong>NOTE:</strong>If your web server is not install squid,make sure cachemgir.cgi and cachemgr.conf are in the same directory,so cachemgr.cgi can find and read cachemgr.conf.</li>
</ul>
</li>
<li>If Squid is installed on web server,just modify cachemgr.conf,add reverse proxy ip to cachemgr.cgi</li>
<li> Add a ScriptAlias in http.conf
<ul>
<li>#ScriptAlias /squid-cgi/ &#8220;/usr/local/squid-cgi/&#8221;</li>
</ul>
</li>
</ul>
<p>Now,reconfig your squid and restart your web server.Type http://192.168.66.101/squid-cgi/cachemgr.cgi in browser.select host 192.168.1.100:80</p>
<ul>
<li>Proxy server #/usr/local/squid/sbin/squid -k reconfig</li>
<li>Web server #service httpd restart</li>
</ul>
<p><strong><img src="http://venushuang.files.wordpress.com/2009/12/screen-shot-2009-12-30-at-11-03-56-am.png?w=366&#038;h=480" alt="Screen shot 2009-12-30 at 11.03.56 AM.png" width="366" height="480" /></strong></p>
<p>Check cache manager using command line,start a terminal on proxy server.</p>
<ul>
<li>#/usr/local/squid/bin/squidclient -p 80 mgr:info</li>
</ul>
<p>If you want control who can access http://192.168.1.100/squid-cgi/cachemgr.cgi , you can use .htaccess.</p>
<p>Modify http.conf</p>
<ul>
<li>AllowOverride AuthConfig ###set .htaccess on</li>
</ul>
<p>#cd /usr/local/squid-cgi/</p>
<p># vi .htaccess ##Add these lines to .htaccess</p>
<ul>
<li>AuthType Basic</li>
<li>AuthName &#8220;Restricted Files&#8221;</li>
<li># (Following line optional)</li>
<li>AuthBasicProvider file</li>
<li>AuthUserFile /usr/local/squid-cgi/.htmypasswd</li>
<li>Require user user01 user02</li>
</ul>
<p>#htpasswd -c -b passwordfile username userpassword</p>
<p>Note:First -c is to create a passwordfile.Add another user is not need character -c.</p>
<p>More information you can visit <a title="Untitled" href="http://httpd.apache.org/docs/2.2/howto/htaccess.html">this link</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venushuang.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venushuang.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venushuang.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=23&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venushuang.wordpress.com/2009/12/30/squid-cache-manager-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e97c4125cb573c68955f9192e8e40a3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venushuang</media:title>
		</media:content>

		<media:content url="http://venushuang.files.wordpress.com/2009/12/screen-shot-2009-12-30-at-11-03-56-am.png" medium="image">
			<media:title type="html">Screen shot 2009-12-30 at 11.03.56 AM.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Jail user to his own directory (Scponly)</title>
		<link>http://venushuang.wordpress.com/2009/12/18/jail-user-to-his-own-directory-scponly/</link>
		<comments>http://venushuang.wordpress.com/2009/12/18/jail-user-to-his-own-directory-scponly/#comments</comments>
		<pubDate>Fri, 18 Dec 2009 03:23:17 +0000</pubDate>
		<dc:creator>venushuang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Configurations]]></category>

		<guid isPermaLink="false">http://venushuang.wordpress.com/2009/12/18/jail-user-to-his-own-directory-scponly/</guid>
		<description><![CDATA[As we know,we can use ssh command to connect linux server and also can use scp or sftp to transfer files on the same port. But sometimes,we don&#8217;t hope user can ssh to linux server and want jail user on his own directory.Now,Scponly can do it. You can get scponly on         [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=14&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As we know,we can use ssh command to connect linux server and also can use scp or sftp to transfer files on the same port. But sometimes,we don&#8217;t hope user can ssh to linux server and want jail user on his own directory.Now,Scponly can do it.</p>
<ol>
<li>You can get scponly on                                                  http://sublimation.org/scponly/wiki/index.php/Download</li>
<li>Configure Scponly
<ul>
<li>#./configure &#8211;prefix=/usr/local/scponly &#8211;enable-chrooted-binary &#8211;enable-scp-compat &#8211;enable-sftp-logging-compat &#8211;enable-rsync-compat &#8211;enable-passwd-compat</li>
<li>#make</li>
<li>#make install</li>
<li>#echo /usr/local/scponly/sbin/scponlyc &gt;&gt; /etc/shells</li>
</ul>
</li>
<li>add user and chroot to his own directory(using scripts)
<ul>
<li>#make jail    //do it on scpony directory</li>
<li><span style="font-family:Tahoma, Verdana, Arial, Helvetica, sans-serif;line-height:19px;">Username to install [scponly]test   //creat chroot user<br style="margin:0;padding:0;" />home directory you wish to set for this user [/home/test]    //user&#8217;s home directory<br style="margin:0;padding:0;" />
<p>name of the writeable subdirectory [incoming]upload //user&#8217;s chroot directroy<br style="margin:0;padding:0;" /></p>
<p>creating /home/test/upload directory for uploading files</p>
<p></span></li>
</ul>
</li>
<li>Now,finished.</li>
<li>Troubleshooting
<ul>
<li>when scp file to server.Couldn&#8217;t open /dev/null: No such file or directorylost connection,you need to create directory at home directory.Just like:
<ul>
<li>#mkdir /home/test/dev</li>
<li>#cp -a /dev/null /home/test/dev</li>
</ul>
</li>
<li>If you found Error on make jail.you need to check setup_chroot.sh to see if LDSO_LIST was been set correct.This is a bug and now it have not been fixed.</li>
</ul>
</li>
<li>Resources
<ul>
<li>http://sublimation.org/scponly/wiki/index.php/Install</li>
<li>https://bugs.launchpad.net/ubuntu/+source/scponly/+bug/122715</li>
</ul>
</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venushuang.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venushuang.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venushuang.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=14&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venushuang.wordpress.com/2009/12/18/jail-user-to-his-own-directory-scponly/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e97c4125cb573c68955f9192e8e40a3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venushuang</media:title>
		</media:content>
	</item>
		<item>
		<title>How to configure Vsftpd(CentOS)</title>
		<link>http://venushuang.wordpress.com/2009/12/16/how-to-configure-vsftpcentos/</link>
		<comments>http://venushuang.wordpress.com/2009/12/16/how-to-configure-vsftpcentos/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:25:03 +0000</pubDate>
		<dc:creator>venushuang</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Server Configurations]]></category>
		<category><![CDATA[configuraion]]></category>
		<category><![CDATA[Vsftpd]]></category>

		<guid isPermaLink="false">http://venushuang.wordpress.com/2009/12/16/how-to-configure-vsftpcentos/</guid>
		<description><![CDATA[Local user configuration local_enable=YES //allow local user login in chroot_local_user=YES //local user login in their own directory,If set to no,local user will login in the directory &#8220;/&#8221; configuration for deny other users login in userlist_enable=YES userlist_deny=YES userlist_file=/etc/vsftpd/vsftp.denyuser //Edit vsftp.denyuser.one line one account.If it is set successful,it will show message &#8220;530 permission denied&#8221; pasv_enable=YES //passive mode<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=4&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li>Local user configuration</li>
</ul>
<p>local_enable=YES //allow local user login in</p>
<p>chroot_local_user=YES //local user login in their own directory,If set to no,local user will login in the directory &#8220;/&#8221;</p>
<ul>
<li>configuration for deny other users login in</li>
</ul>
<p>userlist_enable=YES</p>
<p>userlist_deny=YES</p>
<p>userlist_file=/etc/vsftpd/vsftp.denyuser //Edit vsftp.denyuser.one line one account.If it is set successful,it will show message &#8220;530 permission denied&#8221;</p>
<p>pasv_enable=YES //passive mode</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/venushuang.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/venushuang.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/venushuang.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=venushuang.wordpress.com&amp;blog=10984711&amp;post=4&amp;subd=venushuang&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://venushuang.wordpress.com/2009/12/16/how-to-configure-vsftpcentos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0e97c4125cb573c68955f9192e8e40a3?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">venushuang</media:title>
		</media:content>
	</item>
	</channel>
</rss>
