Which permissions s...
 
Share:
Notifications
Clear all

[Solved] Which permissions should I use for Django folders at my server?


Neha
 Neha
(@asha)
Member Admin
Joined: 4 years ago
Posts: 31
Topic starter  

My host Django hosting puts 777 by default for my Django folders when I use their one-click Django installer.

I am not sure whether that is safe or not, since everyone can then apparently see my source code.

Which permissions should I use for Django folders at my server?


Quote
Topic Tags
myTechMint
(@mytechmint)
Member Moderator
Joined: 4 years ago
Posts: 52
 

Use the below commands for directories and files respectively. Assuming that "." [your present directory] is the directory in which you want to change permissions for all subfolders and files:

find . -type d -exec chmod 755 {} \;

 

find . -type f -exec chmod 644 {} \;

 

Let Apache be the owner using below command 

chown www-data:www-data -R * 
This post was modified 3 years ago by myTechMint
This post was modified 3 years ago by Govind

Neha liked
ReplyQuote