Which permissions s...
 
Share:
Notifications
Clear all

Which permissions should I use for Django folders at my ubuntu 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
 

Give permissions of 755 for directories and 644 for files.

Use the below commands to find all directories in the present working directory and give permission to 755

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

OR

find . -type d | chmod 755

Use the below commands to find all files in the present working directory and give permission to 644

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

OR

find . -type d | chmod 644

ReplyQuote