Virtualmin Pro + Apache + CentOS 7 + Fresh Install - FCGID Permission Issues - How to Resolve? *Last Ticket Hoping*

Virtualmin Pro + Apache + CentOS 7 + Fresh Install - FCGID Permission Issues - How to Resolve? Last Ticket Hoping

I have a fresh installed server that I have spent a good 15-20 hours on perfecting.

I am however running into FCGID group permissions on my Virtual Servers and I don't know how to resolve this.

Any tips would be greatly appreciated. It's as if the domains aren't processing with the correct domain owner.

For Instance:

http://sharpenyoursword.net

(I installed it and manually set permissions, manually created the configuration.php and manually removed the installation folder of Joomla.) Then set all folders to 755 (Which I shouldn't have to do)

After trying to change something, it's now saying it's missing a package. In the admin section, it wants to update Gantry but when attempting to it gives permission denied errors on writing from /tmp to correct /plugins /components directories.

How do I get this working correctly? This is driving me crazy!

Thanks in advanced.

Status: 
Active

Comments

Howdy -- we're happy to help!

I would suggest making things permission "755", though that should happen automatically.

Here's what I might try though. Maybe something got a little goofed up with the permissions, and there's a quick way to resolve that.

What if you go into Limits and Validation -> Validate Virtual Servers -> FIx Directory Permissions, and then you have it correct the permissions for that particular domain.

Do things work better for you at that point?

If not, can you paste in the exact permission errors that you're seeing?

Yes I checked that default is set to 0755 ... even after running those commands you listed above. Same problems.

Joomla Admin - Extensions Update for - RT Gantry is giving me :

Warning Copy failed: /home/www-sys/public_html/tmp/install_581384e4970ee/packages/install_581384e4ae305/MD5SUMS to /home/www-sys/public_html/plugins/system/gantry5/MD5SUMS JInstaller: :Install: Failed to copy file /home/www-sys/public_html/tmp/install_581384e4970ee/packages/install_581384e4ae305/MD5SUMS to /home/www-sys/public_html/plugins/system/gantry5/MD5SUMS Plugin Update: Could not copy files from the source. Package Update: There was an error installing an extension: plg_system_gantry5_v5.3.6.zip Message Error updating package. Notice Before updating ensure that the update is compatible with your Joomla! installation.

What is the output of these commands:

ls -ld /home/www-sys/
ls -ld /home/www-sys/public_html/plugins/system/gantry5/
ls -ld /home/www-sys/public_html/tmp/install_581384e4970ee/packages/

ls -ld /home/www-sys/

drwxr-x--- 13 www-sys www-sys 4096 Oct 28 03:31 /home/www-sys/

ls -ld /home/www-sys/public_html/plugins/system/gantry5/

drwxrwxr-x 3 www-sys www-sys 71 Oct 28 02:51 /home/www-sys/public_html/plugins/system/gantry5/

ls -ld /home/www-sys/public_html/tmp/install_581384e4970ee/packages/

No such file or directory

Hmm, looks like that last directory doesn't currently exist. How about this command:

ls -la /home/www-sys/public_html/tmp/

ls -la /home/www-sys/public_html/tmp/

drwxrwxr-x 2 www-sys www-sys 23 Oct 28 10:03 . drwxr-x--- 21 www-sys www-sys 4096 Oct 28 03:10 .. -rwxrwxr-x 1 www-sys www-sys 31 Oct 28 02:54 index.html

ls -la /home/www-sys/public_html/tmp/

drwxrwxr-x 2 www-sys www-sys 23 Oct 28 10:03 . drwxr-x--- 21 www-sys www-sys 4096 Oct 28 03:10 .. -rwxrwxr-x 1 www-sys www-sys 31 Oct 28 02:54 index.html

That all looks good.

What you may want to do is create a file named test.php, and give it the following contents:

<?php phpinfo(); ?>

Could you give us the URL to that test.php, or otherwise share the info in it?

Ah yeah it does look like it's trying to use mod_php, which could cause that.

You may want to look in /etc/apache2/mods-enabled, and see if there's any "php" related config files there that contain any SetHandler lines. That could be causing the problem you're seeing.

bash: cd: /etc/apache2: No such file or directory

I found /etc/httpd/conf.d/php.conf

in IfModule mod_php7.c there is a "SetHandler application/x-httpd-php" that's not commented out. Should I comment that out?

My apologies the path I mentioned wasn't for CentOS, but for Ubuntu/Debian.

Yes, in the path you're looking is correct.

It looks like your server has PHP installed from a third party repository there, which is likely the cause of the issue you're seeing.

The fix should be straight forward though -- yeah just comment out that SetHandler line you mentioned, and then restart Apache.

After that, does Joomla work as expected?

Okay. I commented that line out , restarted httpd and tried again.

Still getting the 500 Internal Server Error (due to Gantry Package)

So in the Administrator side, I go to update it and receive the following error:

Warning Copy failed: /home/www-sys/public_html/tmp/install_5814caaeb98f5/packages/install_5814caaecbaa2/MD5SUMS to /home/www-sys/public_html/plugins/system/gantry5/MD5SUMS JInstaller: :Install: Failed to copy file /home/www-sys/public_html/tmp/install_5814caaeb98f5/packages/install_5814caaecbaa2/MD5SUMS to /home/www-sys/public_html/plugins/system/gantry5/MD5SUMS Plugin Update: Could not copy files from the source. Package Update: There was an error installing an extension: plg_system_gantry5_v5.3.6.zip Message Error updating package.

It looks like Apache is still trying to use mod_php, rather than FCGID or CGI, which likely indicates that there is another Apache configuration issue somewhere.

What is the output of this command:

findĀ  /etc/httpd/ | xargs grep -i sethandler

grep: /etc/httpd/: Is a directory grep: /etc/httpd/conf: Is a directory grep: /etc/httpd/conf.d: Is a directory

/etc/httpd/conf.d/perl.conf:# SetHandler perl-script /etc/httpd/conf.d/perl.conf:# SetHandler perl-script

/etc/httpd/conf.d/php.conf.rpmsave:# SetHandler application/x-httpd-php /etc/httpd/conf.d/php.conf.rpmsave:# SetHandler application/x-httpd-php-source

/etc/httpd/conf.d/php71-php.conf: SetHandler application/x-httpd-php /etc/httpd/conf.d/php71-php.conf: # SetHandler application/x-httpd-php-source

/etc/httpd/conf.d/php.conf:# SetHandler application/x-httpd-php /etc/httpd/conf.d/php.conf: # SetHandler application/x-httpd-php-source

/etc/httpd/conf.d/php-fpm.conf: SetHandler "proxy:fcgi://127.0.0.1:9000" /etc/httpd/conf.d/php-fpm.conf: # SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"

grep: /etc/httpd/conf.modules.d: Is a directory grep: /etc/httpd/logs: Is a directory grep: /etc/httpd/modules: Is a directory grep: /etc/httpd/run: Is a directory

andreychek,

Thank you kindly for that command and instructions. I edited php7 and php-fpm, added # and restarted. I then was able to update correctly.

ALMOST There!

Re-write is not working. I enabled URL Rewriting in Joomla Admin, then changed htaccess.txt to .htaccess (like I always do on shared servers, such as hostgator, etc. -- my normal workflow.)

and I get a 500 internal server error now. URL re-writing is absolutely crucial. What do you think could be causing this?

Thanks again. You are an amazing help and I value you greatly!

  • Brandon

A 500 error indicates that there should be more information in the error log for that domain.

What message do you see in $HOME/logs/error_log when you get that 500 error?

Touche!

Thank you kindly andreychek. For everything!

I checked the error_log and it displayed ".htaccess: Option FollowSymlinks not allowed here"

I went into the .htaccess and put a # in front of FollowSymlinks and problem solved on re-write.

However I am receiving this strange error... it doesn't seem to go away.

[negotiation:error] [pid] [client ip:port] AH00687: Negotiation: discovered file(s) matching request: /home/www-sys/public_html/index.html (None could be negotiated)., referer: http://sharpenyoursword.net/pages/portfolio

it seems to be outputting this on every link I click.

Scratch that. Everything is working great!

Thanks again andreychek :)

Respect!

God Bless you Sir!

  • Brandon

Oh thank goodness it's working now, as I have never once seen that last error you mentioned there before :-)

Regarding the FollowSymlinks problem -- that's not allowed, as it can cause security issues.

If you need to use symlinks though, feel free to replace that option with "SymLinksIfOwnerMatch", which is a safer way to use that.

That option makes it so that you can have a symlink, but only if the target is owned by the same user that created the symlink.

We're glad to hear things are working now, though feel free to let us know if you have any additional questions!