LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-12-2011, 11:26 AM   #1
Dilbert_halflife
LQ Newbie
 
Registered: May 2011
Posts: 3

Rep: Reputation: 0
Allow access to specific files only


I think this is the correct thread for this question?

I want to restrict the type of files that can be accessed on my web server.

For example only flash movies (SWF files) and one specific PHP file.

I can think of a number of ways of doing this:

1. Linux file permissions, but since the SWF files need to access various PHP files and those PHP files need access to other files themselves that may not work.

2. Using mod_rewrite if that is possible, I don't know as I have never used it.

Or is there some other method?
 
Old 05-12-2011, 01:38 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,165
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Linux permissions is not a good idea indeed.
You can use mod_rewrite, or Files, FilesMatch to match the files/file patterns you want to allow access.

Regards
 
  


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
How to deny root access to specific user's files haariseshu Red Hat 8 09-04-2009 07:36 AM
How to copy a specific no of files from a group of files biswa_nayak Programming 2 05-11-2008 12:21 PM
Allow VNC access only to specific IP's proNick Linux - Newbie 2 02-06-2008 01:44 PM
Compare files in specific directory to files on CD szim90 Linux - Newbie 3 02-10-2007 08:39 PM
Access directory from specific IP mikeshn Linux - General 1 12-19-2003 01:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03: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
Open Source Consulting | Domain Registration