LinuxQuestions.org
Visit Jeremy's Blog.
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 06-13-2007, 10:23 AM   #1
Flip69
LQ Newbie
 
Registered: Jun 2007
Posts: 7

Rep: Reputation: 0
Best file location for include files


We are developing in php on our linux server and want to put the include files outside the var/www/html structure for security reasons, what is the best location to put these files ?

Is this more secure ?

Is /usr/include a good location ?

Or /usr/src ?

Last edited by Flip69; 06-13-2007 at 10:35 AM.
 
Old 06-13-2007, 11:21 AM   #2
nautilus
Member
 
Registered: Jun 2007
Location: London, Athens
Distribution: Debian, Ubuntu
Posts: 36

Rep: Reputation: 15
It doesn't really matter where you have your include files, as long as the directory and files have the right permissions (right permissions = the minimum permissions needed for the application to be able to read them only and nobody else to access them).

If you want a suggestion, I would put it in /usr/local/include/

(the /local/ usually means that what follows is not part of the system, but to the local application(s)/service(s))

Or create something more tailor made like:

/usr/local/<your company's name>/include

Stick more to the permissions than the path...
 
Old 06-13-2007, 11:26 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
My tree looks something like
Code:
www
 |
 +-- site1
       |
       +-- web
       |
       +-- include
Web is the document root for a site. In your situation, I would put it next to the html directory. For me, it gives the advantage that the include files 'stay' with the corresponding site (in case you host multiple sites like I do).

PS
It's more secure as a browser can not access pages that are not under the document
root.

Last edited by Wim Sturkenboom; 06-13-2007 at 12:00 PM.
 
  


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
X include files Gonto Linux - Software 8 01-22-2006 04:42 AM
tar.gz file did not include install file |Spec-ops Linux - Newbie 12 11-17-2005 09:25 AM
location of kernel /usr/src/linux/include ??????? Lord Lance Mandriva 7 12-13-2003 08:41 AM
X include files evian Linux - General 6 03-25-2003 04:53 PM
GTK-2.0 and include files Hubas Programming 2 03-15-2002 08:35 AM


All times are GMT -5. The time now is 10:01 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