- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Apache question
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2007 05:38 AM
02-02-2007 05:38 AM
Server OS:Fedora Core 2
Apache: 2.0.52
Web page root dir: /home/www
There are several virtual host web pages hosted on this one server each has its own directory under /home/www.
Currently the ownership of the files and directories varies between root and a user that no longer works here. I have been asked to clean up the ownerships.
Question: Are there standard practices for assigning ownerships to the web page files.
Any guidance would be most helpful. I can provide more information on the servers configuration if needed.
Thank you.
Gary Glick
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2007 06:33 AM
02-02-2007 06:33 AM
Re: Apache question
For example, if httpd runs as user apache, group apache (check the User and Group directives in your conf file), then your files can be owned by root:apache with 644 permissions and directories with 755 permissions.
You can use the find command to change the permissions:
chown -R root.apache /home/www
find /home/www -type f -exec chmod 644 {} \;
find /home/www -type d -exec chmod 755 {} \;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2007 09:11 AM
02-02-2007 09:11 AM
Re: Apache question
I'll give your suggestion a try.
In your suggestion:
chown -R root.apache /home/www
find /home/www -type f -exec chmod 644 {} \;
find /home/www -type d -exec chmod 755 {} \;
I think the chown command needs to be root:apache.
I'll send some points your way shortly.
thanks again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2007 10:21 AM
02-02-2007 10:21 AM
Re: Apache question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2007 12:05 AM
02-03-2007 12:05 AM
Re: Apache question
chown user.group
Or
chown user:group
This won't work in other Unix flavors
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-03-2007 06:42 AM
02-03-2007 06:42 AM
SolutionBest that pages in an httpd server not be owned by root.
Executable code within the page could more easily get root privledges if the page is attacked.
Generally I like all web pages owned by non-priviledged users who can't do anything bad to the system. Generally its the user associated with the user that is posting the content.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2007 04:07 AM
02-26-2007 04:07 AM
Re: Apache question
I have been able to get the ownership/ permissions issues resolved.
Gary