It seems that this issue hasn't been fixed completely in the latest build 3053, but it has gotten more complicated. It now depends on the way Sublime Text is started, but I don't understand how or why.
The simplest reproducable case goes like this:
1. Open a terminal window, and make sure that no Sublime Text process is already running.
2. Verify that the umask in the shell is set to 0077.
3. Start "subl".
4. Create a new file by entering some text, then save.
5. The new file has permission "rw-rw-rw".
However, and this is where things get strange, if I start Sublime Text through some kind of desktop launcher (I'm using Kupfer), and repeat the exact same steps, the new file has the correct permissions "rw-------". I initially suspected that the umask of the launching process might be different, but as far as I can tell the umask is always 0077 right before Sublime Text is started.
I did some additional testing with strace, and it seems that Sublime Text sets its own umask to 000 at some point during the launch:
- Code: Select all
$ strace -e umask -f subl
Process 12431 attached
[pid 12431] umask(0) = 077
That output also suggests that the original umask was indeed 077.