LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-24-2010, 03:11 AM   #1
mrtndimitrov
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Rep: Reputation: 0
Apache modifies files owned by root


Hello,

I have a very strange situation. I moved existing sites from an old Linux machine to a new one. Everything works fine except I noticed that Apache manages to modify files owned by root. The directory structure and the permissions are as follows:

html drwxr-xrwx
-> my_site drwxr-xr-x
-> -> some_file -rw-r--r--

Everything is owned by root and the group is also root. Apache runs as user and group apache. The problem is that a php script manages to modify some_file. The things get even stranger because when I replicate the exact same directory structure with new files, the php script fails.

Thanks in advance for you advice.
 
Old 03-24-2010, 03:24 AM   #2
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
In your new apache installation suexec (--enable-suexec) is enabled or not ?
 
Old 03-24-2010, 03:28 AM   #3
mrtndimitrov
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hardcorelinux View Post
In your new apache installation suexec (--enable-suexec) is enabled or not ?
I am sorry but how should I check?
 
Old 03-24-2010, 03:46 AM   #4
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
Use phpinfo file and list your apache configuration . Use following code and save it as a php file call it from browser..

<? phpinfo() ?>

May be from shell suexec -V will lsist ( Not sure)
 
Old 03-24-2010, 04:08 AM   #5
mrtndimitrov
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hardcorelinux View Post
In your new apache installation suexec (--enable-suexec) is enabled or not ?
phpinfo() lists in Loaded Modues mod_suexec. So I suppose suexec is enabled.
 
Old 03-24-2010, 04:54 AM   #6
hardcorelinux
Member
 
Registered: Jan 2005
Location: India
Distribution: RHEL,CentOS,SUSE,Solaris10
Posts: 183

Rep: Reputation: 31
What error messages you are getting in http error log, when your php script manages trty to modify some_file ?
 
Old 03-24-2010, 05:22 AM   #7
mrtndimitrov
LQ Newbie
 
Registered: Mar 2010
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by hardcorelinux View Post
What error messages you are getting in http error log, when your php script manages trty to modify some_file ?
There are no errors related to the modification of the file.
 
  


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
how to erase files owned by root? maiden2 Linux - Newbie 6 12-22-2007 08:44 PM
how to edit files owned by root? maiden2 Linux - Newbie 3 12-12-2007 01:32 PM
Editing files owned by root SiW Programming 5 07-31-2007 02:36 PM
all users have access to root owned files sakatola Linux - Security 2 07-22-2005 01:45 AM
vfat mount - all files are 'root' owned, but even root can't -WX d33pdream Linux - General 5 02-28-2003 03:38 AM


All times are GMT -5. The time now is 08:14 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration