Comment 3 for bug 399709

Revision history for this message
Dominic Evans (oldmanuk) wrote :

Sorry, to clarify, when you run a command as sudo that creates files, it bases the permissions of these new files on the umask you have set for your current user (not the umask used by root).

Therefore, on my user account I have the umask set to 0077 which ensures that by default all new files I create are only readable by my user. So if I do `sudo touch /tmp/example` that file will be similarly created with rw only for my user.

The bug here is that add-apt-repository cannot rely on the files it creates having a particular set of permissions, as they rely on whatever the user has set their umask to, and so it should have an additional chmod step that ensures the file is readable by all