Question

My host Djangohosting 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?

Was it helpful?

Solution

Anyone that has access to the files on the machine would actually have access to change your files with those permissions. A lot of times the web server will run under a different User ID (uid) than the uid of your user, so you will probably want to let other users read the files. Given that, you probably want permissions of 755 for directories and 644 for files.

For a detailed description of unix permissions, see here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top