Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
What OS are you using? –  Rizo Jan 23 '11 at 19:16
add comment

2 Answers

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.

share|improve this answer
    
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 '11 at 21:01
    
Yes, that's it! :) –  Rizo Jan 24 '11 at 11:42
add comment

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.

share|improve this answer
    
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 '11 at 21:00
add comment

Your Answer

 
discard

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.