<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: &#8220;Forbidden &#8211; You don&#8217;t have permission to access / on this server&#8221; Error	</title>
	<atom:link href="https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Wed, 13 Dec 2023 04:12:22 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1938417</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Thu, 29 Dec 2022 04:52:57 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=38773#comment-1938417</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1938028&quot;&gt;Colin Wray&lt;/a&gt;.

@Colin,

You are right, it might be a problem with the single-quoted string or the variable in the PHP files...

I can&#039;t help you out, I am not a PHP expert...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1938028">Colin Wray</a>.</p>
<p>@Colin,</p>
<p>You are right, it might be a problem with the single-quoted string or the variable in the PHP files&#8230;</p>
<p>I can&#8217;t help you out, I am not a PHP expert&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Colin Wray		</title>
		<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1938028</link>

		<dc:creator><![CDATA[Colin Wray]]></dc:creator>
		<pubDate>Wed, 28 Dec 2022 13:57:28 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=38773#comment-1938028</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1936272&quot;&gt;Ravi Saive&lt;/a&gt;.

Hello Ravi,

I&#039;m not sure what you mean by &quot;&lt;strong&gt;SELinux&lt;/strong&gt;&quot;.

Here is an &#039;&lt;strong&gt;ls -la&lt;/strong&gt;&#039; of &lt;strong&gt;/var/www&lt;/strong&gt;:
&lt;pre&gt;
-rwsr-xr-x  1 root     pi        8728 Nov 19  2017 MsgToLogger
drwxr-xr-x 12 root     root      4096 Dec 15 14:51 ..
drwxr-xr-x  6 www-data www-data  4096 Dec 22 20:24 .
drwxr-xr-x  2 root     root      4096 Dec 22 20:26 html
drwxr-xr-x  4 root     root      4096 Dec 28 13:33 greenchurch
&lt;/pre&gt;
Don&#039;t forget the message in &lt;strong&gt;/var/log/apache2/error.log&lt;/strong&gt; is:
&lt;pre&gt;
sh: 1: /var/www/MsgToLogger: not found
&lt;/pre&gt;
&quot;not found&quot; instead of lack of permission seems like a bug, especially as php7.0 works OK.]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1936272">Ravi Saive</a>.</p>
<p>Hello Ravi,</p>
<p>I&#8217;m not sure what you mean by &#8220;<strong>SELinux</strong>&#8220;.</p>
<p>Here is an &#8216;<strong>ls -la</strong>&#8216; of <strong>/var/www</strong>:</p>
<pre>
-rwsr-xr-x  1 root     pi        8728 Nov 19  2017 MsgToLogger
drwxr-xr-x 12 root     root      4096 Dec 15 14:51 ..
drwxr-xr-x  6 www-data www-data  4096 Dec 22 20:24 .
drwxr-xr-x  2 root     root      4096 Dec 22 20:26 html
drwxr-xr-x  4 root     root      4096 Dec 28 13:33 greenchurch
</pre>
<p>Don&#8217;t forget the message in <strong>/var/log/apache2/error.log</strong> is:</p>
<pre>
sh: 1: /var/www/MsgToLogger: not found
</pre>
<p>&#8220;not found&#8221; instead of lack of permission seems like a bug, especially as php7.0 works OK.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1936272</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Mon, 26 Dec 2022 05:37:31 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=38773#comment-1936272</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1934604&quot;&gt;Colin Wray&lt;/a&gt;.

@Colin,

Is SELinux disabled or have the correct context settings on the /var/www directory? Please check, it seems some permission issue...]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1934604">Colin Wray</a>.</p>
<p>@Colin,</p>
<p>Is SELinux disabled or have the correct context settings on the /var/www directory? Please check, it seems some permission issue&#8230;</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Colin Wray		</title>
		<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1934604</link>

		<dc:creator><![CDATA[Colin Wray]]></dc:creator>
		<pubDate>Fri, 23 Dec 2022 15:28:59 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=38773#comment-1934604</guid>

					<description><![CDATA[I tried a suggestion in this thread:
&lt;pre&gt;
        AllowOverride None
        Require all granted
&lt;/pre&gt;
but it does not cure the exec problem. 

There has never been a problem creating a file in &lt;strong&gt;/var/www&lt;/strong&gt;, just running an existing one.]]></description>
			<content:encoded><![CDATA[<p>I tried a suggestion in this thread:</p>
<pre>
        AllowOverride None
        Require all granted
</pre>
<p>but it does not cure the exec problem. </p>
<p>There has never been a problem creating a file in <strong>/var/www</strong>, just running an existing one.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Colin Wray		</title>
		<link>https://www.tecmint.com/forbidden-you-dont-have-permission-to-access-on-this-server-error/comment-page-1/#comment-1933855</link>

		<dc:creator><![CDATA[Colin Wray]]></dc:creator>
		<pubDate>Wed, 21 Dec 2022 12:20:32 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=38773#comment-1933855</guid>

					<description><![CDATA[I have an allied permissions problem that Stack Exchange can&#039;t solve. Can anyone here help?

I have a fully working &lt;strong&gt;raspi3b + apache2 + php5&lt;/strong&gt; system on a 32-bit OS.

In a php block there is a simple statement:
&lt;pre&gt;
$msg = &quot;Save Schedule&quot;; exec( &quot;/var/www/MsgToLogger \&quot;$msg\&quot;&quot;, $r );
&lt;/pre&gt;
The executable &lt;strong&gt;MsgToLogger&lt;/strong&gt; has root ownership and &lt;strong&gt;4755&lt;/strong&gt; permissions, and the task is performed fine.

I changed to a &lt;strong&gt;raspi4b + apache2 + php7.4&lt;/strong&gt; on a 64bit OS.

I get &quot;&lt;strong&gt;sh: 1: /var/www/MsgToLogger: not found&lt;/strong&gt;&quot; in apache/error.log

There is no problem writing a file in &lt;strong&gt;/var/www&lt;/strong&gt; using &lt;code&gt;file_put_contents($msgfname,$msg);&lt;/code&gt;.

I have tried putting MsgToLogger in three other places with no luck.]]></description>
			<content:encoded><![CDATA[<p>I have an allied permissions problem that Stack Exchange can&#8217;t solve. Can anyone here help?</p>
<p>I have a fully working <strong>raspi3b + apache2 + php5</strong> system on a 32-bit OS.</p>
<p>In a php block there is a simple statement:</p>
<pre>
$msg = "Save Schedule"; exec( "/var/www/MsgToLogger \"$msg\"", $r );
</pre>
<p>The executable <strong>MsgToLogger</strong> has root ownership and <strong>4755</strong> permissions, and the task is performed fine.</p>
<p>I changed to a <strong>raspi4b + apache2 + php7.4</strong> on a 64bit OS.</p>
<p>I get &#8220;<strong>sh: 1: /var/www/MsgToLogger: not found</strong>&#8221; in apache/error.log</p>
<p>There is no problem writing a file in <strong>/var/www</strong> using <code>file_put_contents($msgfname,$msg);</code>.</p>
<p>I have tried putting MsgToLogger in three other places with no luck.</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
