Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jan 2007
    Posts
    217
    Thanks
    9
    Thanked 0 Times in 0 Posts

    Upload Permissions

    Hey guys,

    I have folders which i allow my users to upload images to. The only problem is, it's making me have to have the folder chmod'ed to 777. otherwise it returns an error saying permission denied.

    I don't want the folder to be 777 because then users can see all the files :X

    Anyway around this?

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    Chown the folder to Apache (or whatever the user is that runs through httpd), and grant privilege of 660. Otherwise, move the directory above you're published directory - local users could still access the folder, but standard web-based access will be denied.
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 

  • #3
    New Coder
    Join Date
    Jul 2008
    Posts
    91
    Thanks
    4
    Thanked 9 Times in 9 Posts
    or htaccess protect it, OR setup an index.html to redirect to the above directory


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •