Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Why the downvote? I'm a new user here and I'm still learning about how to correctly set up a website/webserver. – Shannon Aug 9 '12 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 '12 at 10:06
"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 '12 at 10:12
@MadHatter: Thanks. – Shannon Aug 9 '12 at 10:17

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.

share|improve this answer
A lot of people are doing it? Certainly not a lot of competent people. – MDMarra Aug 9 '12 at 20:11
I agree but what can you do ? :) – golja Aug 10 '12 at 10:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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