[Users] Claws release 4.1.0, group mail sharing disabled

mnieuw at zap.a2000.nl mnieuw at zap.a2000.nl
Tue May 3 21:36:58 UTC 2022


I think I found where it goes wrong.

Adding debugprint statements to both function compose.c->"compose_draft"
and function file-utils.c->"change_file_mode_rw" shows that many times
simply 0600 is set regardless of the folder chmod.

In compose.c, function "compose_draft", around line 10300, a chmod
according to the draft folder settings (0660 in my case) is done
to a file name in ~/.claws-mail/tmp , like draft.0x1216b60 . This has
then the proper settings.

A little later the actual msg in the draft folder however is set to a
hardcoded 0600. file-utils.c:777:file [/mnt/DataLinux/Mail/draft/286]
chmod to 600

This is when the tmp file is copied to to newly created file in the
draft folder. In file-utils.c->copy_file the destination file is
hardcoded set to 0600, with disregard of the folder's chmod preferences.

Also, other files in the draft folder are set to hardcoded 0600, such
as:

file-utils.c:777:file [/mnt/DataLinux/Mail/draft/.claws_cache.new]
chmod to 600

file-utils.c:777:file [/mnt/DataLinux/Mail/draft/.claws_mark.new] chmod
to 600

file-utils.c:777:file
[/home/mat/.claws-mail/tagsdb/#mh/Mail/draft/.claws_tags.new] chmod to
600

The problem is that the chmod is hardcoded, does not look at the folder
settings. I'm not sure what the best solution is here. Probably
function "change_file_mode_rw" could get an extra parameter which has
the desired chmod settings. In the case of file copy, that would have
to be picked up from the destination folder's preferences, if set, else
the current 0600. Or simpler, maybe this can be incorporated into
"change_file_mode_rw" itself.

MatN


More information about the Users mailing list