default userpic

Permission Denied after migration to new server

Vote 0 Votes

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 google help!)

Now, I can login into movable type, but when I want to publish, I get this error:


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

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:


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

the owner and group of all files and directories are mysiteuser:mysiteuser. Do I need to grant permission to the group? If so, how?
My .htaccess file :

Options -Indexes +SymLinksIfOwnerMatch
<IfModule mod_rewrite.c>
<IfModule mod_dir.c>
DirectoryIndex index.php index.html index.htm default.htm default.html default.asp /mtview.php
</IfModule>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)(\?.*)?$ /mtview.php$2 [L,QSA]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /mtview.php
ErrorDocument 403 /mtview.php
</IfModule>

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:

/home/www/mysite.com/public_html/.htaccess: Options not allowed here

And if I comment the Option in .htaccess, I get this error in error_log file:

/home/www/mysite.com/public_html/.htaccess: DirectoryIndex not allowed here

So I renamed the .htaccess file to run my site.

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.

I'm asking you here and if you want any additional info, write here and I'll answer you to solve this issue!
Here, some more information that I think can help you to find the solution:
httpd.conf:


DocumentRoot "/home/www"

<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>

<Directory "/home/www">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>

DirectoryIndex index.html index.htm index.php

AccessFileName .htaccess

ScriptAlias /cgi-bin/ "/home/www/cgi-bin"

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

Mysite conf file:

<VirtualHost 67.205.X:80>


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

<Directory /home/www/mysite.com/public_html>

Options Includes
Order allow,deny
Allow from all
AllowOverride AuthConfig

</Directory>

</VirtualHost>

My OS: CentOS 5 x86_64 bit

Thanks,
Alireza

Reported on Movable Type 4.2

4 Replies

| Add a Reply
  • Have you checked with your host to see if there any general CGI script rules and rules about htaccess files that they enforce?

  • Hi Rob,

    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 ....
    So if you kindly tel me which rules you mean and where I should look for it, I'll look and write here.

    Thanks,

  • 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!

  • AFTER 2 months...

    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!

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1428 5076

Last Topic: Stupid Question? How to make a static homepage by Jeremy on Feb 3, 2012

694 2908

Last Topic: Blogspot to Movable Type by sdude on Feb 8, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 565

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012