Mounted 2nd disk under home directory, but having permission errors

I have a virtualmin installation in debian 7. My hard drive was full so mounted a second under home directory (/home/disk2) using fstab file. I created a virtual server and moved it to second drive by changing it’s home directory (Server Configuration->Change domain name). Whatever i run in moved website, even php hello world I get these errors:

Browser: “Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log.”

Website error log: “(104) Connection reset by peer: mod_fcgid: error reading data from FastCGI server Premature end of script headers: index.php”

All websites on first disk run normally. Owner of second drive is root, changed it to website user but nothing. Permission of website folder is 755. Permission of second disk mounted under home/ is also 755. Also tried to enable “Run CGI scripts as domain owner” in website options.

Thanks for any advice.

Hi,

Can you confirm that your htaccess file uses SymLinksIfOwnerMatch rather than FollowSymLinks in your block?

Like this:
Options +SymLinksIfOwnerMatch -Indexes

None of my websites have .htaccess file in public directory (I looked for hidden files). So I assume there is a global configuration somewhere.

Howdy,

What if you change the PHP Execution Mode to “CGI” (in Server Configuration -> Website Options), do you see a better error message when that occurs?

Also, if you look in Apache’s suexec log (located in /var/log somewhere, the exact location depends on your distro), do you see any errors that occur when trying to access your website?

-Eric

Browser error page remains same.

Website error log for CGI:

[Fri Apr 24 17:31:02 2015] [error] [client 172.16.0.191] suexec policy violation: see suexec log for more details
[Fri Apr 24 17:31:02 2015] [error] [client 172.16.0.191] Premature end of script headers: php5.cgi

Suexec log (found in /var/log/apache2/suexec.log) :

[2015-04-24 17:31:02]: uid: (1014/media) gid: (1007/media) cmd: php5.cgi
[2015-04-24 17:31:02]: (13)Permission denied: exec failed (php5.cgi)

*suexec error for FCGId was the same.

Howdy,

It sounds like you may have some permission issues with the files associated with your domain.

You could start by going into Limits and Validation -> Validate Virtual Servers, and you could try fixing the permissions for that particular domain from there.

-Eric

Hello Eric,

I tried to fix permission errors from virtual server validation but it didn’t solve my problem. Also transfered onother website to /home/disk2/example/ and same problem and when I transfered it back to /home/example the permission error remained. How can I change the default website directory where new websites are going to install, keeping old ones on /home/ and new websites under home/disk2? Maybe the problem is that I tranfer the website.