-3

A website I'm developing requires several directories to have their permissions set to 0777. The directories are used as cache directories for HTML and PHP files generated by the website.

The website doesn't require any "upload" scripts for users to upload content.

Will a hacker be able to upload files to the 0777 directories without the aid of an upload script on my website?

How vulnerable are the 0777 cache directories? What's the best way to protect them in this situation?

3
  • Why the downvote? I'm a new user here and I'm still learning about how to correctly set up a website/webserver. Aug 9, 2012 at 9:56
  • Probably (wasn't me, so don't know for sure) because this question maps directly to "is my PHP code secure?", which isn't something we can answer for you.
    – MadHatter
    Aug 9, 2012 at 10:06
  • 3
    "A website I'm developing requires several directories to have their permissions set to 0777." -- no it doesn't. Never. Ever. EVER.
    – womble
    Aug 9, 2012 at 10:12

1 Answer 1

2

Personally I think it's not a good practice to leave any web folder 0777, but a lot of people are doing it.

One way to increase the security is to run the web site as an dedicated user and then you can get ride of the writing permission for the others. Although that can make the security a bit better, still at the end of the day it comes to how secure the code is.

2
  • A lot of people are doing it? Certainly not a lot of competent people.
    – MDMarra
    Aug 9, 2012 at 20:11
  • I agree but what can you do ? :)
    – golja
    Aug 10, 2012 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.