The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to use Suexec with Apache2 ? kernings UNIX for Dummies Questions & Answers 1 03-10-2008 10:41 PM
problem with dd command or maybe AFS problem Anta Shell Programming and Scripting 0 08-25-2006 11:10 AM
apache suexec hassan1 UNIX for Advanced & Expert Users 0 08-03-2005 08:56 PM
Suexec solution the_last_rites UNIX for Dummies Questions & Answers 13 01-18-2005 08:14 AM
SSH Problem auth problem budrito UNIX for Advanced & Expert Users 1 03-17-2004 10:12 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-07-2008
harrstar harrstar is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 1
suexec problem

Hi all,
I am trying to setup apache w/ suexec to avoid permission problems w/ apache user and website user and also to be able to run a second (test) domain on the same server.
So far I got fcgi w/o suexec running perfectly (logs confirm that). But as soon as I enable the suexec statement in the vhost config I get 500's.
Suexec log shows this :
[2008-03-07 10:33:54]: uid: (1002/galac4) gid: (1004/1004) cmd: php5.fcgi
[2008-03-07 10:33:54]: cannot stat program: (php5.fcgi)

After examining the source of suexec I found that that error means, that suexec thinks that there is a symlink to the php5.fcgi, which is not. here the output of stat from console entry done with a copy of the fcgi entry in the vhost definition:

stat /var/www/galactics/fcgi-bin/php5.fcgi
File: `/var/www/galactics/fcgi-bin/php5.fcgi'
Size: 183 Blocks: 8 IO Block: 4096 regular file
Device: 801h/2049d Inode: 1655474 Links: 1
Access: (0755/-rwxr-xr-x) Uid: ( 1002/ galac4) Gid: ( 1004/ galac4)
Access: 2008-03-06 21:00:35.000000000 -0500
Modify: 2008-03-07 10:32:04.000000000 -0500
Change: 2008-03-07 10:32:04.000000000 -0500

Here is the contens of the php5.fcgi :

#!/bin/sh
#PHPRC=$PWD/../etc
#export PHPRC
#umask 022
#PHP_FCGI_CHILDREN=1
#export PHP_FCGI_CHILDREN
#SCRIPT_FILENAME=$PATH_TRANSLATED
#export SCRIPT_FILENAME
exec /usr/bin/php5-cgi

Have already commented out everything unrelated, still no go (remember, if suexec is not used in the vhost declaration, everything works fine)

Here is the suexec output :
/usr/lib/apache2/suexec2 -V

-D AP_DOC_ROOT="/var/www"
-D AP_GID_MIN=100
-D AP_HTTPD_USER="www-data"
-D AP_LOG_EXEC="/var/log/apache2/suexec.log"
-D AP_SAFE_PATH="/usr/local/bin:/usr/bin:/bin"
-D AP_UID_MIN=100
-D AP_USERDIR_SUFFIX="public_html"

Site is defined in /var/www/galactics/public_html, all permissions checked, all set to that user.
I already have read everything I could find on the net about suexec, the apache docs, analyzed the suexec code. No success.

here is the vhost config:
I have other servers running with this configuration, quite similar and no probs. It looks like suexec has trouble finding/analyzing that wrapper (php5.fcgi). I quadrupel checked the vhost setup, all correct. here it is (suexec commented out as that otherwise throws that 500 error.:

<VirtualHost *:80>
ServerAdmin webmaster@galactics.org
ServerName GALACTICS Clearwater International F.C. - Home
ServerAlias galactics.org
# SuexecUserGroup galac4 galac4

DocumentRoot /var/www/galactics/public_html
ErrorLog /var/www/galactics/logs/error_log
CustomLog /var/www/galactics/logs/access_log combined
ScriptAlias /cgi-bin/ /var/www/galactics/cgi-bin/
DirectoryIndex index.php index.html index.htm

<Directory /var/www/galactics/public_html>
Options Indexes IncludesNOEXEC FollowSymLinks ExecCGI
allow from all
AllowOverride All
AddHandler fcgid-script .php
AddHandler fcgid-script .php5
FCGIWrapper /var/www/galactics/fcgi-bin/php5.fcgi .php
FCGIWrapper /var/www/galactics/fcgi-bin/php5.fcgi .php5
</Directory>
RemoveHandler .php
RemoveHandler .php5

<Directory /var/www/galactics/cgi-bin>
allow from all
</Directory>

LogLevel debug

ServerSignature Off
</VirtualHost>

Anybody there with a hint what to do?

Harry
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0