LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 09: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 09:35 AM.
 
Old 06-13-2007, 10: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, 10:26 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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 11:00 AM.
 
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:49 AM.

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
Open Source Consulting | Domain Registration