Bug 90080

Summary: attachments are saved with missing group permissions
Product: [Applications] kmail Reporter: Ferdinand Gassauer <gassauer>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: lav
Priority: NOR    
Version: 1.7   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: attachment umask fixiation patch

Description Ferdinand Gassauer 2004-09-23 10:49:05 UTC
Version:           1.7 (using KDE 3.2.3, compiled sources)
Compiler:          gcc version 3.2.2
OS:                Linux (i686) release 2.4.19-64GB-SMP

Hi!
the permission is always set to 
-rw-------

regardless what's defined in the directory 
drwxrws---

IMHO the permission of saved attachments should be
-rw-rw-r-- 
or 
-rw-rw----

BTW new directories create on the fly when saveing attachments get the correct permissions

this happens on a SUSE SLES 8.0 with kde 3.2.3 as well as on SUSE 9.1 with KDE CVS

BTW saving a file from an HTML konqueror page, the permissions are correct

cu
ferdinand
Comment 1 Heiko Hund 2005-01-11 10:08:50 UTC
I have the exact same problem with debian's kmail 1.7.1 using Cyrus IMAP.

When saving an attachment to disk, the permissions for the created file are always 0600. I have my umask set to 0022, thus they should be created with 0644.
Comment 2 Heiko Hund 2005-01-13 00:10:40 UTC
Created attachment 9063 [details]
attachment umask fixiation patch

Here is the patch that fixes the umask bug when storing an attachment in
cvs-head. All it does is remove an unnecessary call of fchmod(2), which forces
to file to be created with permissions set to 0600.

Kudos go to Thorsten Zachmann for helping out big time. 

Thank you and good night! =)
Comment 3 stefnn 2005-06-21 21:10:56 UTC
Yes, I also encountered that problem in KMail 1.8.1.

When I save a attachment or drag & drop it to konqueror it gets permissions set to 0600.

I would expect the "normal" behaviour, not removing the group's permissions.

At least it would be nice to provide a option in the configuration dialog, that makes it possible to choose what permissions should be set (or if they should be changed at all)
Comment 4 Juraj Variny 2006-01-19 09:51:06 UTC
In Kmail 1.8.3 from debian-desktop this is still a problem.
Can please bug 83362 be marked as duplicate, and its votes added here?
Comment 5 Juraj Variny 2006-01-19 09:55:39 UTC
Another duplicate with yet more votes: bug 79685
Comment 6 Bernhard E. Reiter 2006-07-04 19:40:02 UTC
There is a corresponding wish in the Kolab tracker:
https://intevation.de/roundup/kolab/issue856
The question is: What are the security implications of the proposed patch?
Comment 7 Bernhard E. Reiter 2006-07-04 19:41:49 UTC
(Sorry for the noise, I did not want to reassign only to confirm the bug.
My mistake. :( )
Comment 8 Edwin Schepers 2006-07-05 11:42:27 UTC
see also http://lists.kde.org/?l=kmail-devel&m=110617586723976&w=2
I've never made it to commit. If there are still no objections, I'll commit.
Comment 9 Heiko Hund 2006-07-05 17:01:26 UTC
I'd give it a go, if I'd be authoritative. =)
Comment 10 Vitaly Lipatov 2007-02-13 08:28:28 UTC
Does it bug duplicate
http://bugs.kde.org/show_bug.cgi?id=79685
?
Comment 11 Heiko Hund 2007-02-13 11:21:30 UTC
It does.
Comment 12 Thomas McGuire 2007-02-13 11:31:53 UTC

*** This bug has been marked as a duplicate of 79685 ***