I guess the destination app will copy permissions from the file.
Often mail is considered private and apps seem to use go-r even if umask is more permissive.
We don't know that this data is mail here, but I think it would be better to err on the side of being private for this data of unknown nature: 0700 for the dir, and 0600 for the file.
(From update of attachment 390806) >CreateUnique( nsIFile: :DIRECTORY_ TYPE, 0775);
>+ tmpDir-
Any reason for g+w here? Is this relying on umask.
>+ rv = NS_NewLocalFile OutputStream( getter_ AddRefs( outputStream) , tmpDir);
And does this just use umask?
I guess the destination app will copy permissions from the file.
Often mail is considered private and apps seem to use go-r even if umask is more permissive.
We don't know that this data is mail here, but I think it would be better to err on the side of being private for this data of unknown nature: 0700 for the dir, and 0600 for the file.