SUMMARY *** Failure to save changed files on samba share. *** An error is thrown when trying to save. This results in inability to close Kmymoney. You need to kill it via Task Manager to stop it. STEPS TO REPRODUCE 1. Move files to remote server. 2. Create samba share to the proper directory. 3. Open file with Kmymoney, make any changes. Then try to save the file. OBSERVED RESULT Error - Unable to open file '//$SERVER/kmymoney/OurFinances.kmy' for writing. C:\_\9b0777e7\kmymoney\kmymoney\plugins\xml\xmlstorage.cpp:510 EXPECTED RESULT Save as normal and move on with my life. SOFTWARE/OS VERSIONS Edition Windows 10 Home Version 22H2 Installed on 9/8/2022 OS build 19045.2193 Experience Windows Feature Experience Pack 120.2212.4180.0 ADDITIONAL INFORMATION The specific samba config for kmymoney is as follows. [kmymoney] comment = our finances via kmymoney path = /home/jason/Documents/Kmymoney browseable = no read only = no guest ok = no valid users = jason create mask = 0644 directory mask = 0755 Debian samba version - $ apt policy samba samba: Installed: 2:4.13.13+dfsg-1~deb11u5 I am able to create and delete files manually via the Windows file manager, just can't save a changed .kmy file.
Which version of KMyMoney are you using? (I don't think it should matter, but just in case.) You can create and delete files on the share, but can you overwrite an existing file? Try opening a small text file in an editor, changing the file, and try to save it. Separately, what does the file manages say about the properties of the kmy file you are trying to save to? Can you launch KMyMoney from command line (a CMD prompt, for example) to see if there is any more detailed error output to the console?
I thought I had selected it in the info above. Kmymoney version 5.1.3-55e5c3c37 Cmd output - Unable to write changes to: //192.168.1.2/kmymoney/OurFinances.kmy Reason: Unable to open file '//192.168.1.2/kmymoney/OurFinances.kmy' for writing. C:\_\9b0777e7\kmymoney\kmymoney\plugins\xml\xmlstorage.cpp:510 As for any file I create I can modify and save to my hearts content. The permissions under the settings in the file manager is everyone has full control of the .kmy file.
I assume 192.168.1.2 is the correct IP for the Samba server. My best guess is that has to do with the way KMM actually saves a file, although I don't see any changes in the code since 2021. There may also be some strange interaction between Windows10 and Samba. I think this will need an look from one of the developers.
Indeed. That is my server's lan ip. I can open the file just fine browsing to it through the file manager once I've added the share. But saving is another story.
For info: I created a samba share on my Debian server using the same config, and using KMyMoney for Linux it saves OK to that.
Must be my samba config I guess. Just almost the same error. Unable to open file '/mnt/OurFinances.kmy' for writing. /build/kmymoney-N273ro/kmymoney-5.1.1/kmymoney/plugins/xml/xmlstorage.cpp:529 This was mounting to my Debian side of my desktop with cifs-utils. I can't imagine why though as I didn't change anything on the defaults, just added my shares. I'll investigate further on my end. Thank you.
Marking as resolved. Turns out a permissions issue. Linux was mounting it as root. Adding -o uid=5004,gid=5004 (my user) and it works fine. I'll see what the equivalent on Windows is. On Linux it saved just fine. Thank you much.
Thanks for the follow-up. Windows doesn't know anything about Linux users and permissions, so Windows itself may well have thought it had full permissions, as long as it was able to mount the share. Windows was happy until the actual attempt by KMM failed. Oddly, I notice the difference in line numbers between your two reports. It looks like you are running 5.1.1 on Debian, which was shortly before some changes to that code, although it doesn't seem to have made any difference in your case.