Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 24th March 2010, 12:33 PM
mrtndimitrov Offline
Registered User
 
Join Date: Mar 2010
Posts: 1
windows_7safari
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.
Reply With Quote
  #2  
Old 24th March 2010, 12:49 PM
SlowJet Offline
Registered User
 
Join Date: Jan 2005
Posts: 5,002
linuxfedorafirefox
Re: Apache modifies files owned by root

The httpd files should own by apache:apache

Use cp to get the files into /var/www/html/appdir (that is owned by apache
That way the ownership and selinux labels are set to the recieving owner.

It takes some firts time work for each new set of files and any new file.
The chmod can then tighten security on the apache files.

using 400 500 700 as needed to get rx rw rwx in just the first set. Root does not need pessions to start up httpd.

Now the only user that can access files in httpd is apache, and hackers and bad code can not get into or out of httpd.

SJ
__________________
Do the Math
Reply With Quote
Reply

Tags
apache, files, modifies, owned, root

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
I was able to move file owned by root. jentyk Security and Privacy 16 17th July 2008 07:36 PM
Stupid Question RE deleting root owned folder tizwoz Using Fedora 3 11th October 2006 01:49 PM
How to delete files owned by a certain user/group/UID/GID MarkE Using Fedora 5 20th June 2006 05:59 AM
Granting permission to files owned by apache piforever Using Fedora 17 16th March 2006 06:44 PM


Current GMT-time: 17:32 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat