iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Internet Security Discussion Forum This forum is for the discussion of security related issues. If you find a new Phishing scheme, spyware, virus or malicious site - let us know about it. If any of the above found you... here's where you ask for help.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-05-2008, 06:49 PM
morestar's Avatar
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2007
Location: Burlington, Ontario (Toronto)
Posts: 940
morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5
Default Permissions for Picture Folder.

Hello and thank you for your time and contributions.

My problem is the following: On one of my sites I have pictures in a particular directory. I'm trying to block the viewing up this directory and it's contents by accessing it via a browser but still want to allow my website to publish them.

I tried changing the permissions on the folder (to this and that) to no avail.

If someone has an idea or solution please advise.

Again thank you for your time evryone.

!!!
__________________
Join free dating sites and meet single people without paying a penny.
Reply With Quote
  #2 (permalink)  
Old 11-06-2008, 11:42 AM
Dubbya's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Nov 2006
Location: Steinbach, Manitoba, Canada
Posts: 1,300
Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4Dubbya RepRank 4
Default Re: Permissions for Picture Folder.

It would be helpful if you could tell us your server platform and a URL would be nice as well.

IIS?

Apache?

Are FrontPage extensions installed?
Reply With Quote
  #3 (permalink)  
Old 11-06-2008, 01:01 PM
morestar's Avatar
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2007
Location: Burlington, Ontario (Toronto)
Posts: 940
morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5
Default Re: Permissions for Picture Folder.

it is apache
i don't want to post the url cause of the security issue - as it stands it's being attacked almost daily...with executable files being uploaded into the directory...
__________________
Join free dating sites and meet single people without paying a penny.
Reply With Quote
  #4 (permalink)  
Old 11-06-2008, 02:58 PM
wige's Avatar
Moderator
WebProWorld Moderator
 
Join Date: Jun 2006
Location: United States
Posts: 2,648
wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9wige RepRank 9
Default Re: Permissions for Picture Folder.

Let me be sure I understand the situation. You have a folder which contains the images for your site, and you are trying to block the viewing of the contents of that folder?

Also, how are the executable files being uploaded? That is generally a more serious problem than the images being able to be downloaded.
__________________
The best way to learn anything, is to question everything.
Reply With Quote
  #5 (permalink)  
Old 11-06-2008, 05:48 PM
ran_dizolph's Avatar
WebProWorld Veteran
 
Join Date: Jul 2005
Location: Windsor, ON
Posts: 543
ran_dizolph RepRank 2
Default Re: Permissions for Picture Folder.

Just drop an index file in the folder that redirects the user back to your homepage or something.
Reply With Quote
  #6 (permalink)  
Old 11-06-2008, 05:56 PM
WebProWorld Veteran
 
Join Date: Apr 2004
Posts: 349
imvain2 RepRank 1
Default Re: Permissions for Picture Folder.

for the picture accessing on apache..

you can create a .htaccess file and store it in the root directory of your website.

Code:
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^http://(.+\.)?mysite\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
RewriteRule .*\.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpe [L]
Stop Hotlinking with htaccess. Test your Image Hotlink Protection with our Hotlink Checker from altlab.com.

plus as ran_dizolph pointed out, create an index.php file and drop it into your image folder. Have index.php redirect users to the home page.

--------------------------------------------------------------

As for uploading bad files, this is a different issue all together.
Reply With Quote
  #7 (permalink)  
Old 11-06-2008, 06:04 PM
incrediblehelp's Avatar
WebProWorld 1,000+ Club
WebProWorld MVP
 
Join Date: Jan 2004
Location: Live in Cincy Now
Posts: 7,573
incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4incrediblehelp RepRank 4
Default Re: Permissions for Picture Folder.

Why not block the folder with htaccess?

.htaccess tricks and tips.. part one: tips, tricks, hints, examples; juicy .htaccess information.
Reply With Quote
  #8 (permalink)  
Old 11-06-2008, 11:45 PM
vwickam's Avatar
WebProWorld New Member
 
Join Date: Oct 2005
Location: Evansville, IN
Posts: 21
vwickam RepRank 0
Default Re: Permissions for Picture Folder.

There are a few things that could help this situation.

First, make sure that your permissions of the folder and the files in it are set to 744. You can do this from SSH or telnet by changing into that directory, and typing

chmod 744 *

This will ensure that the files and folder are readable, but not writable.

If you are still being attacked after doing this, you are probably either running an insecure application on your website, or you are on hosting that is not running at the most up-to-date patch level.

If you are running any 3rd party applications on your site - CMS's, message boards, etc. - make sure that you are running the current stable version of the software, and that it isn't an unsupported package (that it has been updated fairly recently.)

If you aren't running any 3rd party apps, your webhost may be running an out of date version of PHP, MySQL, Perl, or Apache which may have vulnerabilities that are being exploited.

Good luck!

<in your signature only please>
__________________
Vi Wickam Principal Web Solutions - http://www.PrincipalWebSolutions.com - Web Application for Real Business

Last edited by crankydave; 06-26-2009 at 10:32 AM.
Reply With Quote
  #9 (permalink)  
Old 11-16-2008, 10:31 AM
morestar's Avatar
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2007
Location: Burlington, Ontario (Toronto)
Posts: 940
morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5
Default Re: Permissions for Picture Folder.

but one thing they seem to be able to do is upload files to the folder. Actually, all members are able to and their pictures viewable from a browser.

i changed the permissions to 751 and this disallowed viewing the pictures from the browser but allows the member pictures to be displayed throughout the site. setting the permissions to 750 stop the members from uploading pictures.

I also have everything setup in my ini file and .htaccess but...to no avail...

in the next few days some geek that thinks defacing my pictures folder is impressive.
__________________
Join free dating sites and meet single people without paying a penny.
Reply With Quote
  #10 (permalink)  
Old 11-16-2008, 11:51 AM
WebProWorld Veteran
 
Join Date: Apr 2004
Posts: 349
imvain2 RepRank 1
Default Re: Permissions for Picture Folder.

So, if you are wanting to allow the members to upload photos, but only photos. Why not alter the upload script to only allow, jpg, png and gif files?
Reply With Quote
  #11 (permalink)  
Old 11-16-2008, 11:55 AM
morestar's Avatar
WebProWorld Veteran
WebProWorld MVP
 
Join Date: Jun 2007
Location: Burlington, Ontario (Toronto)
Posts: 940
morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5morestar RepRank 5
Default Re: Permissions for Picture Folder.

Quote:
Originally Posted by imvain2 View Post
So, if you are wanting to allow the members to upload photos, but only photos. Why not alter the upload script to only allow, jpg, png and gif files?
that is my problem and I'm looking into it right now...this may take some time...
__________________
Join free dating sites and meet single people without paying a penny.
Reply With Quote
  #12 (permalink)  
Old 11-16-2008, 12:01 PM
WebProWorld Veteran
 
Join Date: Apr 2004
Posts: 349
imvain2 RepRank 1
Default Re: Permissions for Picture Folder.

depending on the programming language, this could be really simple.

If you want post, just the upload script and I'm sure someone can update it for you.
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Internet Security Discussion Forum

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Permissions in windows 2003 server riprok IT Discussion Forum 0 11-08-2005 02:13 AM
How to Set permissions: e.g chmod 755 on FTP Program ponpots Web Programming Discussion Forum 1 08-13-2004 06:48 PM
data source name permissions DavidatWork IT Discussion Forum 0 04-15-2004 04:12 PM


All times are GMT -4. The time now is 01:05 AM.



Search Engine Optimization by vBSEO 3.3.0