LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 07-21-2006, 02:13 AM   #1
vikasumit
Member
 
Registered: Apr 2006
Location: Delhi, India
Distribution: Fedore , CentOs, Debian
Posts: 121

Rep: Reputation: 15
Apache Suexec not working


Hi,

I am having apache 2.0.52 installed on Centos 4.3 to run virtual host with SuExec. (SElinux is disabled on server)

Every thing is working file except that, when I try to create file using PHP code it gives permission denied though I have set the write permission on folder for user.

In virtual tag I have

<virtualhost ...>
SuExecUserGroup abc abc
</virtualhost>

and their is linux user called abc with group abc with home directory at /home/abc
and Document root for web at /home/abc/public_html

now I try to make file in /home/abc/public_html and it gives Permission denied, but when I give permission to nobody it create file with user "apache" (my default apache user set through User apache in httpd.conf )

My conclusion is that apache is not suexec'in to abc where as it should be..

mind it apache runs perfect and it shows that /usr/sbin/suexec wrapper bind properly, no error whatsoever

I need this urgent please
 
Old 07-21-2006, 05:53 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,830
Blog Entries: 54

Rep: Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993Reputation: 2993
now I try to make file in /home/abc/public_html and it gives Permission denied, but when I give permission to nobody it create file with user "apache" (my default apache user set through User apache in httpd.conf )
If you don't use the User and Group directives in the virtualhost container then suexec defaults to the user Apache runs as. If there's more errors please post error_log lines.


SElinux is disabled on server
You have disabled SELinux AND you're running PHP. PHP applications can be safely regarded as flawed by default (unless proven otherwise). SELinux (and mod_security) can help you secure your box. If you are going to have PHP code publicly accessable it would be beneficial for you and us to make SELinux work instead of disabling it.


I need this urgent please
LQ doesn't do "urgent". LQ is a purely volunteer-driven community effort relying on it's members to supply answers when they can, not when you want it. If you want 24/7 realtime dedicated response capabilities please consider hiring a local GNU/Linux guru.
 
Old 07-21-2006, 06:49 AM   #3
vikasumit
Member
 
Registered: Apr 2006
Location: Delhi, India
Distribution: Fedore , CentOs, Debian
Posts: 121

Original Poster
Rep: Reputation: 15
now I try to make file in /home/abc/public_html and it gives Permission denied, but when I give permission to nobody it create file with user "apache" (my default apache user set through User apache in httpd.conf )

If you don't use the User and Group directives in the virtualhost container then suexec defaults to the user Apache runs as. If there's more errors please post error_log lines.

================ If i remember correctly, In apache 2 documentation, USER and GROUP are not required if we are using SuExecUserGroup and hence depericated ... any idea

SElinux is disabled on server
You have disabled SELinux AND you're running PHP. PHP applications can be safely regarded as flawed by default (unless proven otherwise). SELinux (and mod_security) can help you secure your box. If you are going to have PHP code publicly accessable it would be beneficial for you and us to make SELinux work instead of disabling it.

=============== I have disable it to check my application, as SELinux need some extra settings need to be done to make my application work. Don't worry I will open that once I test my application

I need this urgent please
LQ doesn't do "urgent". LQ is a purely volunteer-driven community effort relying on it's members to supply answers when they can, not when you want it. If you want 24/7 realtime dedicated response capabilities please consider hiring a local GNU/Linux guru.
=============== I need this urgent as, if any one has any idea on how to do or any idea that might help please pass that , not necessarily a complete solution
And I am free to get hired myself
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache php suexec problem pecko Linux - Software 0 02-24-2006 06:22 AM
apache suexec hassan2 Linux - Software 0 08-03-2005 08:01 PM
Apache, suexec and virtual hosts :\ chibi Linux - Software 1 05-02-2005 01:17 PM
Apache Suexec Maze the Kid Linux - Software 0 04-05-2005 05:05 PM
Apache suexec Rachel Carter Linux - Software 0 01-31-2003 04:27 PM


All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration