Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I am using cPanel with apache 2 and php 5.2. I have a file upload script, which currently puts the uploaded files in a directory with 0777 perms and the file itself also has 0777 perms. this is because with other perms, i would be thrown an "Invalid Access" error.

so, what perms should i use so that the files are secure, but can still be accessed when a user wants to download them via my download script?

share|improve this question
Well, seeing that with permissions any different from 0777 you get the "Invalid Access" error, you don't really have much of a choice, do you? But maybe there is something you could do. Do you control the server? – wolfgangsz Aug 13 '10 at 16:11
up vote 1 down vote accepted

Are you the SysAdmin of this server?

If you are then I have just answered a very similar question here

If not you need to question if you're happy to have you site on this server at all.

share|improve this answer

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.