Restrict access to upload folder

We have noticed a few attempts at uploading files to an upload folder on one of our websites.

The permissions are 777 as we use ckeditor as a html editor, therefore the client needs to upload files.

Are we able to put the following htaccess file in this directory to limit uploads to the clients static ip address?

Any other solutions would be welcomed.
order allow deny
deny from all
allow from <your_IP>

Open in new window

Cheryl LanderAsked:
Who is Participating?
 
mega666Connect With a Mentor Commented:
if it's a LINUX hosting - YES you can put a .htaccess file to allow the IP's to upload

OR - if that would work for your clients - you can just set up a FTP for them which would have the "UPLOAD" folder as their "home" folder, so when they connect to the FTP - it goes straight to the UPLOAD fiolder and they cannot browse anywhere else.
0
 
Cheryl LanderAuthor Commented:
hi mega 666.

The "OR" option doesn't really fit in with the question.

We are trying to avoid people hacking / uploading files into the website.

So does the .htaccess file still work with our question?
its a cms system where uploads are managed via a web interface, not using ftp.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.