Bug 4633 - Claws Mail no longer honouring umask when saving attachments
Summary: Claws Mail no longer honouring umask when saving attachments
Status: RESOLVED INVALID
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Other (show other bugs)
Version: 4.1.0
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2022-10-07 00:46 UTC by KJP
Modified: 2022-10-07 16:33 UTC (History)
0 users

See Also:


Attachments

Description KJP 2022-10-07 00:46:01 UTC
I run Claws Mail in a dedicated user account so messages cannot access my main user's files. I have made my main user a member of the dedicated user's group so it has group permission to access saved attachments and copy them over. This has worked well for a year or two.

However, in the last few weeks an upgrade seems to have changed this behaviour. Now, all saved attachments have no group or world permissions even though the umask remains at 022. This means I can no longer access saved attachments. I have set my Inbox chmod to 644 but the attachments are still saved 600. This is a blocker for me because if I cannot access received attachments I cannot work.

I hope this regression can be found and patched quickly as I need this to work.

Steps to Reproduce

1. Open a message with an attachment
2. Right-click the attachment and select Save As or Save All
3. Choose location and click Save

Expected Result

Attachment will be saved according to umask.

Actual Result

Attachment is saved with mode 600.
Comment 1 Paul 2022-10-07 09:37:51 UTC
Tell us more about the upgrade. What did you upgrade? In the case of Claws Mail, what version did you upgrade from? What else did you upgrade? This sounds like a change outside of Claws Mail so far.
Comment 2 Paul 2022-10-07 10:32:51 UTC
The "Folder chmod" folder properties control how the message files are saved in that mailbox folder.

When viewing attachments they are extracted to ~/.claws-mail/mimetmp/. The files which are written to mimetmp/ and the attachments which you save following the umask set at system level and not the 'folder chmod' value.

Therefore, you need to re-set your umask in ~/.bashrc as it must have changed somehow with your upgrade.
Comment 3 KJP 2022-10-07 15:27:09 UTC
No, the umask is:

[mailuser@machine ~]$ umask
0002

The attachments are still saved as 700.
Comment 4 Paul 2022-10-07 16:33:45 UTC
Claws Mail is not controlling that.

Note You need to log in before you can comment on or make changes to this bug.