<?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>Alexey Bokov's weblog &#187; perl</title>
	<atom:link href="http://bokov.net/weblog/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>http://bokov.net/weblog</link>
	<description>Anything that interests me</description>
	<lastBuildDate>Fri, 11 Nov 2011 12:32:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>suexec &#8211; permission denied</title>
		<link>http://bokov.net/weblog/administration/suexec-permission-denied/</link>
		<comments>http://bokov.net/weblog/administration/suexec-permission-denied/#comments</comments>
		<pubDate>Wed, 29 Jul 2009 10:17:58 +0000</pubDate>
		<dc:creator>Alexey Bokov</dc:creator>
				<category><![CDATA[administration]]></category>
		<category><![CDATA[500 internal error]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cgi]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[suexec]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://bokov.net/weblog/?p=260</guid>
		<description><![CDATA[On one of my apache I use suexec to run some tasks &#8211; some weeks before I configure all it and all stuff works well, but some days later when I try to run my cgi-perl script I found I have &#8220;500 Internal error&#8221;. I change nothing in apache config or in my scripts &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>On one of my apache I use suexec to run some tasks &#8211; some weeks before I configure all it and all stuff works well, but some days later when I try to run my cgi-perl script I found I have &#8220;500 Internal error&#8221;. I change nothing in apache config or in my scripts &#8211; I just install fresh updates for ubuntu. In apache&#8217;s error log I&#8217;ve got :</p>
<address> [Wed Jul 29 08:15:28 2009] [error] (13)Permission denied: exec of &#8216;/usr/lib/apache2/suexec&#8217; failed</address>
<address> [Wed Jul 29 08:15:28 2009] [error] [client <strong><em>my_ip</em></strong>] Premature end of script headers: script.pl</address>
<p>It&#8217;s strange, but anyway it doesn&#8217;t works. I spent some time trying to fix it ( some guys recommend to rebuilt suexec &#8211; but it&#8217;s not a simplest way to fix this problem ) &#8211; in my case it was fixed by changing owner of my suexec. I check out current properties :<br />
ls -la /usr/lib/apache2/suexec<br />
-rwsr-xr&#8211; 1 root www-data 18872 2009-07-10 18:40 /usr/lib/apache2/suexec<br />
and change them :</p>
<address><em>chown root:root /usr/lib/apache2/suexec</em></address>
<address><em>chmod 4755 /usr/lib/apache2/suexec</em></address>
<p>And don&#8217;t forget to restart :</p>
<address>/etc/init.d/apache2 restart</address>
<p>ps. by the way suexec&#8217;s id&#8217;s are :</p>
<address>#id www-user<br />
uid=1000(www-user) gid=109(www-group) groups=109(www-group)</address>
]]></content:encoded>
			<wfw:commentRss>http://bokov.net/weblog/administration/suexec-permission-denied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

