Last active
May 2, 2020 09:23
-
-
Save abhiabhi94/1fb7facb8baefff6e5677f0c38ee707d to your computer and use it in GitHub Desktop.
Commands to set up permissions for a django project with apache
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project_name=staycurious | |
db_file_name=db.sqlite3 | |
sudo chown :www-data ~/$project_name/db.sqlite3 | |
# This will work only for sqlite | |
sudo chmod 664 ~/$project_name/$db_file_name | |
sudo chown :www-data ~/$project_name/ | |
sudo chown -R :www-data ~/$project_name/media | |
sudo chmod -R 775 ~/$project_name/media |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment