Which permissions s...
 
Share:
Notifications
Clear all

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


Neha
 Neha
(@asha)
Member Admin
Joined: 1 year ago
Posts: 27
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: 1 year ago
Posts: 29
 

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 1 month ago by myTechMint
This post was modified 2 weeks ago by Govind

Neha liked
ReplyQuote