Restrict access to upload folder

Posted on 2011-10-12
Last Modified: 2014-01-27
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

Question by:Cheryl Lander
    LVL 4

    Accepted Solution

    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.

    Author Comment

    by:Cheryl Lander
    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.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System ( introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
    Envision that you are chipping away at another e-business site with a team of pundit developers and designers. Everything seems, by all accounts, to be going easily.
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now