Re: Permission denied

David Birnbaum <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel,gmane.spam.detected
Message-ID <[email protected]>
Martijn,

Well, if you can't tell from inspection why the exec is failing, then 
what I usually do is truss or strace the proc manager and watch the 
various system calls are that fail.  Usually that gives me the 
information I need to track it down.  Unfortunately, it's very much 
based on your specific installation so you're somewhat on your own.  Try 
following the whole chain as the right user (start as root, make sure 
you can cd where httpd is when it forks off suexec, become the user, and 
continue to trace execution through) until you find the place where 
permissions are set wrong, either on a cd, exec, stat, etc.

David.

------------------------------------------------------------------------

Martijn de Munnik wrote:
> Hi David,
>
> Thank you for your reply! I tried what you said and these are the 
> result. I can't cd into /opt/csw/apache2/sbin where the suexec binary 
> is but I guess root needs to run suexec and the suexec process runs 
> the php5-cgi fastcgi script.
>
> ------------
>
> -bash-3.2$ pwd
> /opt/csw/apache2
> -bash-3.2$ id
> uid=10000(goedkooplpgtanken.nl) gid=10000(goedkooplpgtanken.nl)
> -bash-3.2$ 
> /opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi
> <?php echo("It works.\n"); ?>
> Content-type: text/html
>
> It works.
> -bash-3.2$
>
> ------------
>
> Martijn
>
> On 21-jan-2008, at 16:39, David Birnbaum wrote:
>
>> Martijn,
>>
>> Well, the error looks pretty explicit:
>>
>> [Mon Jan 21 11:55:38 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (uid 10000, gid 10000) started (pid 26418)
>> FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26418), execle() failed: Permission denied
>> The execle() error message is passed back from the OS.  Is it 
>> possible that you're not really testing as UID 10,000 the same we 
>> suexec is running things?  Do an "id" before you launch it, and see 
>> if it's returning the right thing.  Also, run the whole line from the 
>> command line when cd'd in the same the directory that suexec is 
>> launching from, and make sure it properly starts up that way as well.
>>
>> David.
>>
>> ------------------------------------------------------------------------
>>
>> Martijn de Munnik wrote:
>>> Hi,
>>>
>>> my apache error_log show the following error. I've also tried without the suexec wrapper and I'm quiet sure that suexec is not the problem. I can run the php5-cgi script from the commandline as the user with uid 10000 without any problem?
>>>
>>> Any ideas?
>>>
>>>
>>>
>>> [Mon Jan 21 11:55:23 2008] [notice] suEXEC mechanism enabled (wrapper: /opt/csw/apache2/sbin/suexec)
>>> [Mon Jan 21 11:55:23 2008] [notice] mod_python: Creating 8 session mutexes based on 256 max processes and 0 max threads.
>>> [Mon Jan 21 11:55:23 2008] [notice] mod_python: using mutex_directory /tmp
>>> [Mon Jan 21 11:55:23 2008] [notice] Digest: generating secret for digest authentication ...
>>> [Mon Jan 21 11:55:23 2008] [notice] Digest: done
>>> [Mon Jan 21 11:55:23 2008] [notice] Apache/2.2.6 (Unix) mod_ssl/2.2.6 OpenSSL/0.9.8g mod_fastcgi/2.4.2 DAV/2 SVN/1.4.5 mod_python/3.3.1 Python/2.5.1 configured -- resuming normal operations
>>> [Mon Jan 21 11:55:23 2008] [notice] FastCGI: wrapper mechanism enabled (wrapper: /opt/csw/apache2/sbin/suexec)
>>> [Mon Jan 21 11:55:23 2008] [notice] FastCGI: process manager initialized (pid 26387)
>>> [Mon Jan 21 11:55:38 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (uid 10000, gid 10000) started (pid 26418)
>>> FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26418), execle() failed: Permission denied
>>> [Mon Jan 21 11:55:38 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26418) terminated by calling exit with status '255'
>>> [Mon Jan 21 11:55:45 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (uid 10000, gid 10000) restarted (pid 26420)
>>> FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26420), execle() failed: Permission denied
>>> [Mon Jan 21 11:55:45 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26420) terminated by calling exit with status '255'
>>> [Mon Jan 21 11:55:51 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (uid 10000, gid 10000) restarted (pid 26421)
>>> FastCGI: can't start server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26421), execle() failed: Permission denied
>>> [Mon Jan 21 11:55:51 2008] [warn] FastCGI: (dynamic) server "/opt/csw/apache2/share/htdocs/suexec/goedkooplpgtanken.nl/php5-cgi" (pid 26421) terminated by calling exit with status '255'
>>>
>>>
>>> ___________________________________
>>> fastcgi-developers mailing list
>>> http://fastcgi.com/fastcgi-developers/
>>>   
>> !DSPAM:4794bce02966070788949! 
>
> ------------------------------------------------------------------------
>
> ___________________________________
> fastcgi-developers mailing list
> http://fastcgi.com/fastcgi-developers/
>

___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.