<?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/"
	>

<channel>
	<title>SupportSages &#187; pure-ftpd</title>
	<atom:link href="http://www.supportsages.com/blog/tag/pure-ftpd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supportsages.com/blog</link>
	<description>Technical Support and Server Management : Musings in the fox hole.</description>
	<lastBuildDate>Thu, 05 Jan 2012 03:05:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>pure-ftpd fails to start in a OpenVZ server</title>
		<link>http://www.supportsages.com/blog/2009/07/pure-ftpd-fails-to-start-in-a-openvz-server/</link>
		<comments>http://www.supportsages.com/blog/2009/07/pure-ftpd-fails-to-start-in-a-openvz-server/#comments</comments>
		<pubDate>Sun, 05 Jul 2009 12:42:27 +0000</pubDate>
		<dc:creator>George</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Troubleshooting]]></category>
		<category><![CDATA[VPS]]></category>
		<category><![CDATA[capability]]></category>
		<category><![CDATA[ispCP]]></category>
		<category><![CDATA[openvz]]></category>
		<category><![CDATA[pure-ftpd]]></category>
		<category><![CDATA[pureftpd]]></category>

		<guid isPermaLink="false">http://www.supportsages.com/blog/?p=429</guid>
		<description><![CDATA[Issue : pure-ftpd was not starting in a ispCP enabled VPS server. It was showing failed status in both xinetd and standalone version. ispCP stores the information in MySQL database.

Troubleshooting :

Run the pure-ftpd script using the command itself, and without the sysV startup script.
<code>/usr/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -E -fftp -H -I15 -lmysql:/etc/pure-ftpd/pureftpd-mysql.conf -L7500:8 -m4 -s -U133:022 -u500 -i -Oclf:/var/log/pureftpd.log -k99 -Z -4</code>

Again failure. Now turn for strace.
<code>yum install strace</code>

Error to be noted was below
<code>
capset(0x19980330, 0, {CAP_CHOWN&#124;CAP_DAC_READ_SEARCH&#124;CAP_SETGID&#124;CAP_SETUID&#124;CAP_NET_BIND_SERVICE&#124;CAP_NET_ADMIN&#124;CAP_SYS_CHROOT&#124;CAP_SYS_NICE, CAP_CHOWN&#124;CAP_DAC_READ_SEARCH&#124;CAP_SETGID&#124;CAP_SETUID&#124;CAP_NET_BIND_SERVICE&#124;CAP_NET_ADMIN&#124;CAP_SYS_CHROOT&#124;CAP_SYS_NICE, 0}) = -1 EPERM (Operation not permitted)</code>

followed by a log message in /var/log/messages as
<code>pure-ftpd: (?@?) [ERROR] Unable to switch capabilities ...]]></description>
			<content:encoded><![CDATA[<p>Issue : pure-ftpd was not starting in a ispCP enabled VPS server. It was showing failed status in both xinetd and standalone version. ispCP stores the information in MySQL database.</p>
<p>Troubleshooting :</p>
<p>Run the pure-ftpd script using the command itself, and without the sysV startup script.<br />
<code>/usr/sbin/pure-ftpd --daemonize -A -c50 -B -C8 -D -E -fftp -H -I15 -lmysql:/etc/pure-ftpd/pureftpd-mysql.conf -L7500:8 -m4 -s -U133:022 -u500 -i -Oclf:/var/log/pureftpd.log -k99 -Z -4</code></p>
<p>Again failure. Now turn for strace.<br />
<code>yum install strace</code></p>
<p>Error to be noted was below<br />
<code><br />
capset(0x19980330, 0, {CAP_CHOWN|CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_NET_ADMIN|CAP_SYS_CHROOT|CAP_SYS_NICE, CAP_CHOWN|CAP_DAC_READ_SEARCH|CAP_SETGID|CAP_SETUID|CAP_NET_BIND_SERVICE|CAP_NET_ADMIN|CAP_SYS_CHROOT|CAP_SYS_NICE, 0}) = -1 EPERM (Operation not permitted)</code></p>
<p>followed by a log message in /var/log/messages as<br />
<code>pure-ftpd: (?@?) [ERROR] Unable to switch capabilities : Operation not permitted</code></p>
<p>Edit the VPS configuration file in the node to add lines below directly as below and then restart the vps from node or PIM or anything you use as the control panel.</p>
<blockquote><p>CAPABILITY=&#8221;CHOWN:on DAC_READ_SEARCH:on SETGID:on SETUID:on NET_BIND_SERVICE:on NET_ADMIN:on SYS_CHROOT:on SYS_NICE:on&#8221;</p></blockquote>
<p>A restart of VPS should fix the error</p>
<div class="tweetthis" style="text-align:left;"><p> <a  class="tt" href="http://twitter.com/home/?status=pure-ftpd+fails+to+start+in+a+OpenVZ+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F429" title="Post to Twitter"><img class="nothumb" src="http://www.supportsages.com/blog/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter3.png" alt="Post to Twitter" /></a> <a  class="tt" href="http://twitter.com/home/?status=pure-ftpd+fails+to+start+in+a+OpenVZ+server+http%3A%2F%2Fwww.supportsages.com%2Fblog%2F429" title="Post to Twitter">Tweet This Post</a></p></div>]]></content:encoded>
			<wfw:commentRss>http://www.supportsages.com/blog/2009/07/pure-ftpd-fails-to-start-in-a-openvz-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

