<?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>The Developer Day &#187; centos</title>
	<atom:link href="http://www.thedeveloperday.com/tag/centos/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedeveloperday.com</link>
	<description>Staying Curious</description>
	<lastBuildDate>Tue, 27 Jul 2010 17:33:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Starting services in a clean environment</title>
		<link>http://www.thedeveloperday.com/starting-services-in-a-clean-environment/</link>
		<comments>http://www.thedeveloperday.com/starting-services-in-a-clean-environment/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 22:35:50 +0000</pubDate>
		<dc:creator>Žilvinas Šaltys</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[services]]></category>

		<guid isPermaLink="false">http://www.thedeveloperday.com/?p=482</guid>
		<description><![CDATA[I was working on a small web application that creates Subversion branches and tags. In short it just executes SVN commands on the repository. Whenever a user executes an SVN command the SVN client tries to check user&#8217;s local home folder for the .subversion configuration directory. The issue that I was running into was that [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a small web application that creates Subversion branches and tags. In short it just executes SVN commands on the repository. Whenever a user executes an SVN command the SVN client tries to check user&#8217;s local home folder for the <strong>.subversion</strong> configuration directory. The issue that I was running into was that for some reason apache&#8217;s home folder was pointing to our system&#8217;s administrator <strong>home folder</strong> which in turn would result in a <strong>permission denied</strong> error when apache would try to access the .subversion folder.</p>
<p>It just didn&#8217;t make any sense. Turns out if you start a service through <strong>/etc/init.d/</strong> it starts that service with environment variables belonging to the user that started the service. In this case our system&#8217;s administrator started the service using his own user.</p>
<p>To start services in a clean environment a special utility called <strong>service</strong> should be used. It usually resides in the <strong>/sbin</strong> directory. So for example instead of starting apache like this:</p>
<blockquote style="background: #444; color: #fff; padding-left: 2px;"><p><em>$ sudo /etc/init.d/httpd start</em></p></blockquote>
<p>It should be started like this:</p>
<blockquote style="background: #444; color: #fff; padding-left: 2px;"><p><em>$ sudo /sbin/service httpd start</em></p></blockquote>
<p>Which will result in <strong>$HOME</strong> <strong>environment variable</strong> being empty and the SVN client not getting a <strong>permission denied</strong> error.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thedeveloperday.com/starting-services-in-a-clean-environment/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
