Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
08-15-2007, 11:43 AM
|
#1
|
Member
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274
Rep:
|
Apache Restrict ALL access to file from web
Hey all,
I have some plain text files within one of my web directories. I need to access this file from a php script, so permissions must be:
-rw-r-r
But if i type in this file in my address bar, obviously the plain text file is seen.
Is there a way in Apache to restrict this, withOUT using .htaccess? .htaccess allows restricted access to files, I want to disallow ANYONE (myself included) from accessing this file via the WEB.
Thanks all very much!
|
|
|
08-15-2007, 12:08 PM
|
#2
|
LQ Veteran
Registered: Sep 2003
Posts: 10,532
|
Hi,
Does this text file need to be in the htdocs (web) directory tree?
If not: Why not put it outside the htdocs tree (= not readable by apache) and access it from there using your php script.
Hope this helps.
|
|
|
08-15-2007, 02:08 PM
|
#3
|
Member
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 274
Original Poster
Rep:
|
well, then it still wont be readable by "other" users, which is what i need to do, to allow "apache" users (as web users) to access the file.
Basically, i have a plain text password file.
But need to read this file (from php script, not web)
Thanks
|
|
|
All times are GMT -5. The time now is 12:13 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|