0

I want to put my Django site in /usr/local/django/mysite.

Does it matter whether this directory is owned by root or as a lower-level user?

I'm probably going to have developers push code changes to my web host using fabric, which means they will have ssh access. Are there some guidelines for setting up users and permissions to facilitate deployment while restricting access to things I don't want just anyone to have access to?

1
  • What OS are you using?
    – Rizo
    Jan 23, 2011 at 19:16

2 Answers 2

1

The simplest form is to create a group for people using the functionalities you want, than just add users to this group permitting them have access to needed services.

2
  • How about a "django" group, a "django" user and chmod 775 everything in /usr/local/django? Then I could add users to this group - they could modify files in /usr/local/django but they won't have access to the web server.
    – Nate
    Jan 23, 2011 at 21:01
  • Yes, that's it! :)
    – Rizo
    Jan 24, 2011 at 11:42
0

Does it matter whether this directory is owned by root or as a lower-level user?

If the owner is root, then apache/uWSGI/django can't modify files.

Are there some guidelines for setting up users and permissions to facilitate deployment while restricting access to things I don't want just anyone to have access to?

Use sudo.

1
  • Does Apache need to modify anything in /usr/local/django/mysite in order to serve my Django app? This would actually seem to be good from the standpoint of security.
    – Nate
    Jan 23, 2011 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .