<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html" />
  <link rel="self" type="application/atom+xml" href="http://forums.movabletype.org/atom.xml" />
  <id>tag:forums.movabletype.org,2011://24/tag:forums.movabletype.org,2009://24.15507-</id>
  <updated>2011-09-01T02:24:38Z</updated>
  <title>Comments for Permission Denied after migration to new server</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2009://24.15507</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.movabletype.org/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=24/entry_id=15507" title="Permission Denied after migration to new server" />
    <published>2009-06-13T04:26:54Z</published>
    <updated>2009-08-17T16:29:32Z</updated>
    <title>Permission Denied after migration to new server</title>
    <summary>Hi, I had to migrate to a dedicated server which I ordered for myself and because of having no money(!) I had to configure apache, myself (I did not know anything about apache and server configuration and did it with...</summary>
    <author>
      <name>Alireza</name>
      <uri>http://alireza.modarres.net/weblog</uri>
    </author>
    
    <category term="Installation" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>Hi,</p>

<p>I had to migrate to a dedicated server which I ordered for myself and because of having no money(!) I had to configure apache, myself (I did not know anything about apache and server configuration and did it with google help!)</p>

<p>Now, I can login into movable type, but when I want to publish, I get this error:<br />
<pre><br />
Writing to '/home/www/mysite.com/public_html/archives/author/admin-1/2009/06/index.php.new' failed: Opening local file '/home/www/mysite.com/public_html/archives/author/admin-1/2009/06/index.php.new' failed: Permission denied<br />
</pre></p>

<p>Even changing the permission of files and directories too 777, I get this error. I tested to Page Archive that is a static, and got the same error: <br />
<pre><br />
Writing to '/home/www/mysite.com/public_html/contactus.php.new' failed: Opening local file '/home/www/mysite.com/public_html/contactus.php.new' failed: Permission denied<br />
</pre><br />
the owner and group of all files and directories are mysiteuser:mysiteuser. Do I need to grant permission to the group? If so, how?<br />
My .htaccess file :<br />
<pre><br />
Options -Indexes +SymLinksIfOwnerMatch<br />
  &lt;IfModule mod_rewrite.c&gt;<br />
  &lt;IfModule mod_dir.c&gt;<br />
    DirectoryIndex index.php index.html index.htm default.htm default.html default.asp /mtview.php<br />
  &lt;/IfModule&gt;<br />
  RewriteEngine on<br />
  RewriteCond %{REQUEST_FILENAME} !-d<br />
  RewriteCond %{REQUEST_FILENAME} !-f<br />
  RewriteRule ^(.*)(\?.*)?$ /mtview.php$2 [L,QSA]<br />
&lt;/IfModule&gt;<br />
&lt;IfModule !mod_rewrite.c&gt;<br />
  ErrorDocument 404 /mtview.php<br />
  ErrorDocument 403 /mtview.php<br />
&lt;/IfModule&gt;<br />
</pre><br />
With this .htaccess, all my pages (even html and non MT files) get Internal error 500. I looked into error_log file of apache and noticed about this error:<br />
<pre><br />
/home/www/mysite.com/public_html/.htaccess: Options not allowed here<br />
</pre><br />
And if I comment the Option in .htaccess, I get this error in error_log file:<br />
<pre><br />
/home/www/mysite.com/public_html/.htaccess: DirectoryIndex not allowed here<br />
</pre><br />
So I renamed the .htaccess file to run my site.</p>

<p>I asked two of my friends who know MT very well and both of them told me that the problem is because of  wrong apache configuration.</p>

<p>I'm asking you here and if you want any additional info, write here and I'll answer you to solve this issue!<br />
Here, some more information that I think can help you to find the solution:<br />
httpd.conf:<br />
<pre><br />
DocumentRoot  "/home/www"</pre></p>

<p>&lt;Directory /&gt;<br />
    Options FollowSymLinks<br />
    AllowOverride None<br />
&lt;/Directory&gt;</p>

<p>&lt;Directory "/home/www"&gt;<br />
    Options Indexes FollowSymLinks<br />
    AllowOverride All<br />
    Order allow,deny<br />
    Allow from all<br />
&lt;/Directory&gt;</p>

<p>DirectoryIndex index.html index.htm index.php</p>

<p>AccessFileName .htaccess</p>

<p>ScriptAlias /cgi-bin/ "/home/www/cgi-bin"</p>

<p>&lt;Directory "/home/www/cgi-bin"&gt;<br />
    AllowOverride None<br />
    Options None<br />
    Order allow,deny<br />
    Allow from all<br />
&lt;/Directory&gt;<br />
VirtualScriptAlias  /home/www/%0/public_html/cgi-bin/<br />
</p>

<p>Mysite conf file:</p>

<pre>
&lt;VirtualHost 67.205.X:80&gt;

<p><br />
        ServerName mysite.com<br />
        ServerAlias www.mysite.com<br />
        ServerAdmin myemail@gmail.com<br />
        DocumentRoot /home/www/mysite.com/public_html<br />
        ScriptAlias /cgi-bin/ /home/www/mysite.com/public_html/cgi-bin/</p>

<p>        &lt;Directory /home/www/mysite.com/public_html&gt;</p>

<p>                Options Includes<br />
                Order allow,deny<br />
                Allow from all<br />
                AllowOverride AuthConfig</p>

<p>        &lt;/Directory&gt;</p>

<p>&lt;/VirtualHost&gt;<br />
</p></pre>

<p>My OS: CentOS 5 x86_64 bit</p>

<p>Thanks,<br />
Alireza</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15507-comment:25111</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15507" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html#c25111" />
    <title>Comment from Rob Kenny on 2009-06-13</title>
    <author>
        <name>Rob Kenny</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Have you checked with your host to see if there any general CGI script rules and rules about htaccess files that they enforce?</p>]]>
    </content>
    <published>2009-06-13T07:43:20Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15507-comment:25113</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15507" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html#c25113" />
    <title>Comment from Alireza on 2009-06-13</title>
    <author>
        <name>Alireza</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Hi Rob,</p>

<p>As I said, I configure this server myself. I got a empty server with just OS and then with google help, I installed  apache, mysql, php and ....<br />
So if you kindly tel me which rules you mean and where I should look for it, I'll look and write here.</p>

<p>Thanks,</p>]]>
    </content>
    <published>2009-06-13T08:33:39Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15507-comment:25115</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15507" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html#c25115" />
    <title>Comment from Alireza on 2009-06-13</title>
    <author>
        <name>Alireza</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>well, i changed all files and directories' permissions to 777 and now, mt publishes well. BUT, isn't it dangerous? By the way the .htaccess file is still disabled!</p>]]>
    </content>
    <published>2009-06-13T13:06:34Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15507-comment:28203</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15507" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/06/permission-denied-after-migration-to-new-server.html#c28203" />
    <title>Comment from Alireza on 2009-08-17</title>
    <author>
        <name>Alireza</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>AFTER 2 months...</p>

<p>in httpd.conf, there are directives user and groups. In my configuration, both of them were apache, so I changed the owner and group file MT's file to apache and everything goes well! </p>]]>
    </content>
    <published>2009-08-17T16:29:32Z</published>
  </entry>

</feed>

