0

Possible Duplicate:
What are the recommended directory permissions?

I've scoured the net, and it seems that everyone has different methods of doing this and I just want to get a quick straight answer if possible. So i'm on Centos with apache installed.

I know the files folder has to be 777, but 777 is insecure as anyone can write to it, but isn't that what we need since anonymous users have to write to it when they upload to the server like images or what not? And not to forget drupal throws an error if its not 777.

Also if my user for that domain is foo, then the ownership of files and all its items inside would be foo:foo correct? But im reading it should be foo:www-data ? so which one is it?

1
  • 1
    Anonymous user will upload file, but its the Apache User which will write it to the DIR, so its enough if Apache User has read write access to files DIR instead of 777.
    – GoodSp33d
    Commented Feb 4, 2013 at 7:13

1 Answer 1

1

It depends somewhat on your server configuration but it doesn't have to be 777, and in fact it should not be 777 as that is a security issue.

The web server user (on your server, not your drupal site) is what has to be able to write to the files directory. Whether the drupal user is logged in or anonymous is unrelated.

For information on this see http://drupal.org/node/244924

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