[Users] Saving draft doesn't set msg mode as specified in draft folder properties

Mat mnieuw at zap.a2000.nl
Tue Jul 30 12:49:30 UTC 2024


Hi,

> > [2024-07-29 19:06:15] * message: Draft path, name: draft, draft
> > [2024-07-29 19:06:15] * message: Temp file name
> > /home/mat/.claws-mail/tmp/draft.0x15a3c00
> > [2024-07-29 19:06:15] * message: Folder chmod 641
> > [2024-07-29 19:06:15] * message: Temp file mode set to 661
> > =====
> > 
> > The second 6 is hard coded, if a folder's chmod is read only, the
> > code changes the tmp msg files mode to rw. Note that all Mail
> > folders are another partition, mounted rw for mail users, although
> > I can't see how that should affect it.
> > 
> > Is there another place in the code that afterwards should set the
> > proper filemode?  
> 
> For me, the above just makes the situation more confused and clarifies
> nothing. debug_print()'s either always print to the terminal when
> --debug mode is used or never print to the terminal when --debug is
> not used; there is no /sometimes/. Your dated output doesn't really
> tell us anything at all. "The second 6 is hard coded", it's not clear
> what this refers to.
> 
> Anyway, your problem seems to be a local problem. What is causing it
> is not possible to say with only the provided info to go on.

Sorry, I did not specify things clearly enough.
I am using Mint 21.3 on fast machine, and version 4.3.0 compiled from
source.
- debug_print does print to the terminal, but for some reason it
  doesn´t always show there for me. I guess I lose about half of them,
  that is why I started using log_message . This works fine.
- "The second 6 is hardcoded" is indeed confusing. What the code does
  is that if for group or others the folder's chmod is set to read, it
  always sets it to write also, so a 4 will become a 6. compose.c, line
  10358. I actually don't know what the reason for this is.
- I can duplicate the problem as follows:
  If in folderlist.xml the path for folder type mh is set to Mail (thus
  the root mail folder is under the user's home directory), it sets the
  msg rights to 660 , even though the draft folder's chmod is set to
  641 (it loses the '1´, and the 4 is converted to 6) .
  If I set the mh path to /mnt/DataCommon/Mail it sets the msg rights
  to 600, and only on the queue and draft folders.

So in both cases if doesn't follow the folder's settings. I should be
able to find out what causes this.

Regards, Mat


More information about the Users mailing list