Debt Consolidation - Market and finance - Find services - Web Hosting - Debt Consolidation

PDA

View Full Version : Apache don't execute the files


mehdiali
Nov 20th 2007, 10:01 pm
hi everyone
image : !
i have a upload center and let user upload their images.
i use linux and apache.
i've heard(i don't anything about it) that apache(on linux) can
limit a folder so that files of folder just can download
but can't execute(if someone even upload a php file he can't run this).
so i don't need some filters and let users upload anything they want.
i have two questions :
1.is it true
2.how can do this.
thank you in advance

phpl33t
Nov 20th 2007, 10:13 pm
Um, why not chmod 666 or 644 so they cannot be executed?

serialCoder
Nov 20th 2007, 10:15 pm
hmm, if its an image upload script that you're running then you should probably just filter the files and only allow certain file formats for images

mehdiali
Nov 21st 2007, 7:50 am
uploaded files in mentioned folder can't run, they just can download !

prosman
Nov 21st 2007, 12:36 pm
reinstall apache!
if rebuild php version or rebuild apache sometimes bugged.

krt
Nov 21st 2007, 3:17 pm
uploaded files in mentioned folder can't run, they just can download !
Yes, so why don't you change permissions as phpl33t said?

This might help:
chmod -R 644 /path/to/upload_dir

Or through your FTP client.

tonybogs
Nov 21st 2007, 9:03 pm
In regards to serialCoders comment.

Just limiting the file format could be dangerous. Its still possible to execute something with a .jpg extension for example. Someone silly might ForceType the jpg type or access is directly through a script causing all sorts of havoc.

Just a thought :)