Change default permission modes on Linux servers

For our Kamibu projects we use Subversion for versioning of our code. As we aren’t only one person each other user on our server has to be able to modify files created by the svn command. Thus files need to get created with 0660 as their permission modes. The default permission modes on a debian system seem to be 0644. To change this behavior you’ve to edit /etc/profile. Search for the umask line.

On our fresh installed server it looked like this:

umask 022

This means 777 – 022 = 755. For directorys this is correct, to get the permission modes of a file you’ve to subtract 111. So after editing this line and saving the file you should logout and with your next login you will benefit from your new default permission modes.

Leave a Reply