Bug 401397

Summary: kmymoney changes group permissions
Product: [Applications] kmymoney Reporter: stst
Component: fileAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: major CC: buckh
Priority: NOR    
Version: 5.0.2   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.4

Description stst 2018-11-25 13:34:31 UTC
SUMMARY
kmymoney changes group permissions

STEPS TO REPRODUCE
1. change group permissions on kmy file (chmod g+rw *.kmy)
2. open file in kmymoney 5.0.2
3. do some change and save

OBSERVED RESULT
group permissions have changed

EXPECTED RESULT
The permissions should not be changed


SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: Ubuntu 1804
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
This problem did not occur with versions before 5.0.2.
Comment 1 buckh 2019-04-18 00:32:21 UTC
same here

it seems like the XMLStorage plugin sets the permissions
to be

QFileDevice::ReadUser | QFileDevice::WriteUser

at

https://cgit.kde.org/kmymoney.git/tree/kmymoney/plugins/xml/xmlstorage.cpp#n524

formerly, this was done:

  QFileInfo info(file);
  ...
  m_fmode = QFileDevice::ReadUser | QFileDevice::WriteUser;
  m_fmode |= info.permissions();

at https://cgit.kde.org/kmymoney.git/tree/kmymoney/views/kmymoneyview.cpp?h=v5.0.1#n746

i'll attach a patch, though i don't have the local build
environment to check to see if it either compiles or does
what it's supposed to
Comment 2 buckh 2019-04-18 00:52:58 UTC
well, when i went to attach a patch it said to use phabricator,
so i submitted a patch here:

https://phabricator.kde.org/D20646

hope that's useful
Comment 3 Jack 2019-04-19 14:41:04 UTC
It seems the patch was committed through Phabricator, but the Bug number there missed one digit, so this bug was not automatically closed.
Comment 4 buckh 2019-04-19 22:05:00 UTC
(In reply to Jack from comment #3)
> It seems the patch was committed through Phabricator, but the Bug number
> there missed one digit, so this bug was not automatically closed.

thanks for catching that

and sorry