Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Dell PowerEdge Servers
  #1  
Old August 22nd, 2002, 04:59 PM
Ditch Ditch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 10 Ditch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 37 sec
Reputation Power: 0
securing a dir on server

Hey there,

I am trying to find a script to keep folks from linking to files on my server. I have a few dirs, that I would like to allow folks to link images and such from, but most of the others I want to restrict access to. I was told this could be done through some sort of apache mod, but I am at a loss when it comes to that. I'm not sure exactly how to do this, or what sort of script would do it, therefore I didn't post in a more specific board.

Any help would be much appreciated.

Thanks,

-Ditch

Reply With Quote
  #2  
Old August 22nd, 2002, 05:16 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Wouldn't it be easiest just to set the permissions of the directory so that web users can't access it?

Reply With Quote
  #3  
Old August 22nd, 2002, 05:25 PM
Ditch Ditch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 10 Ditch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 37 sec
Reputation Power: 0
I was thinking about the chmod, but wouldn't that restrict access to other things as well? Also, if I were to do that, would I have to chmod each particular file, or would just setting the permissions on the dir work?

Thanks for the response.

Reply With Quote
  #4  
Old August 22nd, 2002, 10:08 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
When you chmod a directory, you're restricting things related to the directory:

Listing the contents, writing new files to it, etc.

If you just chmod the directory for no access, people can still access a file if they know the full path to it already.

You would need to chmod each individual file, but that's not too tough.

Reply With Quote
  #5  
Old August 22nd, 2002, 10:55 PM
AlCapone's Avatar
AlCapone AlCapone is offline
Mobbing Gangster
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Sep 2001
Location: "Best City" 2002 and 2003- Melbourne, Australia
Posts: 4,913 AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level)AlCapone User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 5 h 36 m 31 sec
Reputation Power: 13
Send a message via ICQ to AlCapone Send a message via AIM to AlCapone Send a message via Yahoo to AlCapone
Search apache forum for mod_rewrite and image hotlinking - this sort of questions pop up nearly every day and have been answered many times.
__________________
And you know I mean that.

Reply With Quote
  #6  
Old August 23rd, 2002, 01:46 AM
Ditch Ditch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 10 Ditch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 37 sec
Reputation Power: 0
Thanks AlCapone, I'll have a look around in there.

Reply With Quote
  #7  
Old August 28th, 2002, 06:29 PM
rooty rooty is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 9 rooty User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
chmod it 751

Reply With Quote
  #8  
Old August 29th, 2002, 09:18 PM
Ctb's Avatar
Ctb Ctb is offline
An Ominous Coward
Dev Shed Specialist (4000 - 4499 posts)
 
Join Date: Jan 2002
Posts: 4,425 Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level)Ctb User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 3 Weeks 10 h
Reputation Power: 0
Wait... are you trying to totally restrict access to everything in the directory, or only certain files?

Reply With Quote
  #9  
Old September 4th, 2002, 06:54 AM
Ditch Ditch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 10 Ditch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 37 sec
Reputation Power: 0
Well actually what I would like to do, is to restrict someone from using an image or any file in a particular dir, to say link onto their site. I have one dir, that I allow my members to use, for images they use on other forums and such, but I don't want that option to be available with the rest of the site's files. Like if someone wanted to link me from their site, and just linked my banner rather than upload it to their server, I want to stop that....heh. Sorry, having trouble explaining myself tonight.

Also, another thing I was trying to figure out how to do, is to stop search engines from accessing various pages within my website. I would like it so that the only page that ever shows up, is the 'index.html.' I would like to do the same thing with everyone really, so that if someone linked my forums, they would be automatically redirected to the index.html. I believe someone mentioned a meta tag like 'bots=o' or something, and they then told me I would have to resubmit my site to all of the engines. I figure there must be a way to keep the web crawling out, and have any links that show up be redirected to my index page, without having to go through the process of re-submitting.

Thanks for your help.

Reply With Quote
  #10  
Old September 5th, 2002, 02:57 AM
Ditch Ditch is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 10 Ditch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 55 m 37 sec
Reputation Power: 0
Ok, I figured out the search engine & meta tag part, and figured out how to modify the htaccess file so that people can't hotlink to images, but I am still at a loss on how to redirect other sites who direct link to specific pages within my site, to the index.html.

A friend did this with asp I know, but that is not an option for me.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > securing a dir on server


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway