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

1195 3842

Last Topic: Comment form customization by anisa on Feb 8, 2010

60 184

Last Topic: Dynamic Publishing - Blank Screen by Sivaram M on Dec 15, 2009

955 2987

Last Topic: MT5 - Cookie Problems by Dave Cross on Feb 9, 2010

68 213

Last Topic: How to add Custom Fields by gregoryttp on Feb 5, 2010

19 67

Last Topic: Custom main index page by Richard on Feb 7, 2010

42 169

Last Topic: I want to write my own wordpress plugin by Xarzu on Jan 31, 2010

11 21

Last Topic: Monthly Calendars Help Needed by joe leblanc on Jan 19, 2010

91 326

Last Topic: SpamLookup Keyword Filter 2.1 not work by b.n09 on Nov 17, 2009

52 178

Last Topic: Assets - No options by Chelle on Feb 5, 2010

code.sixapart.com

128 444

Last Topic: ActionStream with Movable Type 5.01 by Parneix on Jan 24, 2010

154 468

Last Topic: URGENT! Help needed w/ Virus by PhilContrino on Feb 1, 2010