LinuxQuestions.org
Review your favorite Linux distribution.
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 04-22-2006, 06:20 PM   #1
eagletalontim
Member
 
Registered: Jan 2006
Posts: 34

Rep: Reputation: 15
Exclamation .htaccess allow question??


is there any way to allow a certain file to be read only by a certain file?

I am trying to block a user from directly viewing a javascript file, but i want the file that needs the javascript to be able to read it and everything work.

thanks in advance
Tim
 
Old 04-22-2006, 07:30 PM   #2
pdeman2
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413

Rep: Reputation: 30
I'm not positive I know what you're saying, but I'm assuming that the javascript file needs to be run by a webserver. If this is the case, then find out what user and group your server is running as. Once you have done that, open up your terminal, do a chown <user>:<group> <file> on that file, where <user> is the user your server runs as, <group> is the group your server runs as, and <file> is the path to the javascript file. Once you have completed this step, do a chmod 711 <file>. Also, you have to be root to do this.

Last edited by pdeman2; 04-22-2006 at 07:31 PM.
 
Old 04-22-2006, 07:39 PM   #3
eagletalontim
Member
 
Registered: Jan 2006
Posts: 34

Original Poster
Rep: Reputation: 15
that is a problem...i do not have root access
 
Old 04-22-2006, 07:53 PM   #4
pdeman2
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413

Rep: Reputation: 30
In that case, I'm not sure. You could always ask your administrator to do that for you.
 
Old 04-23-2006, 01:07 AM   #5
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
If by JavaScript, you mean client-side JavaScript (what it usually means), then you can't do this because it's a completely client-side technology. The user (i.e. the web browser) needs to be able to load the JavaScript file.
 
  


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
Apache .htaccess question mustangfanatic01 Linux - Software 4 03-17-2006 02:42 AM
.htaccess question kidestranged Linux - Software 0 03-08-2005 11:57 AM
.htaccess Question tommytomato Linux - Security 2 06-14-2004 11:37 AM
.htaccess question djthewombat Linux - General 1 10-21-2002 08:24 AM
htaccess question Legolas Linux - Security 0 08-24-2001 01:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 08:02 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration