Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

apache on linux security question

Status
Not open for further replies.

pavNell

Technical User
Sep 27, 2002
178
US
For a webserver (my first attempt) running on linux, would it be prudent to restrict all "others" from reading/writing/executing ALL files/directories on the filesystem (except the docs I want to serve of course)? For instance suppose all my docs to serve are located in /usr/ and I ran the following command as root...
find / -exec chmod o-rwx {} \;
to remove all permissions on every file/directory on the entire filesystem to "others"
and then
find /usr/ -exec chmod o+r {} \;
to add just read permissions to my "web pages"

and assuming that my intention is just to serve some basic web pages, could things like mysql and/or php stop working correctly?

I'm just trying to understand how to enhance security on a web server at the OS level. It just seems that for a basic setup to just serve web pages, no file/directory should be accessible to the outside world other thaan the docs in my htdocs directory. Thanks for any feedback and/or suggestions.
btw, using LAMPPIX.
 
are they accessible?

Binary Intelligence, true or false?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top