LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 11-21-2005, 08:06 PM   #1
blizunt7
Member
 
Registered: Mar 2004
Distribution: Fedora Core 1,2,3, RHEL3,4,5 Ubuntu
Posts: 272

Rep: Reputation: 30
permissions on flat file php authentication


Hey all,
I am trying to create a secure site. Have decided to go with PHP, working fine. I am using a flat file to authenticate users, and have run into an issue. With the permissions set for all to read, one can view the file from the browers if the flat file name is know.
However, with read permissions removed, any user cannot access this file and authentication can not take place. Am i missing something here?

THanks.

Josh
 
Old 11-23-2005, 05:39 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 48
You should put the file in a directory that is not under the Web site, since PHP can read from other locations in the system. You can also set Apache to deny access to that file.
 
Old 11-23-2005, 06:13 AM   #3
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
Else the simple solution I use for my own framework is to give the file the PHP extension, and write it like that:
Code:
<?php exit(1); ?>
...
... Actual content of the file
...
Yves.
 
  


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
Manipulating Fields Of Flat File Prasun1 General 10 09-29-2005 11:42 AM
Making VSAM file from a flat file in AIX Raghothaman AIX 2 08-25-2004 04:55 PM
Flat File QC Scripting mychl Programming 5 02-20-2004 11:53 AM
creating a flat binary file with gcc wsimmons Programming 2 01-08-2002 11:33 AM
file permissions w/apache php caguru Linux - Newbie 3 04-26-2001 07:52 AM


All times are GMT -5. The time now is 03:02 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration