I've no idea what KDE product or component this goes under or whether the problem is caused by a KDE component, however because the end result of the problem is the ecryptfs directory being umounted causing lots of KDE app write errors I thought it best to report it here. To reproduce this bug you need Samba installed with the smbd deamon running and you need to have your home directory encrypted using ecryptfs. You also need to create a shared directory, that is publically available ie requires no login. Example. You have a Windows 10 system on your network, you access the shared directory and after a while you get write errors from any apps (KDE or otherwise) you are using. This is because the ecryptfs directory has unmounted. Whether the ecryptfs unmounts is determined by the counter /dev/shm/ecryptfs-$USER-Private. Typically after KDE starting this counter is either 1 or 2 and with each new user login e.g. ALT-F1/F2 etc the counter increments and then decrements when the user logs out. Eventually when everybody logs out, including the KDE desktop user the counter goes to 0 and the ecryptfs un-mounts. The problem is when an smb access occurs the counter never increments however a few seconds later it always decrements. This causes the counter to reach 0 prematurely and the home directory is unmounted. Problem is your KDE desktop is still running and now KDE and any apps your running at the time can't access the home directory and KDE reports unable to write this config file etc.. So is this an smb issue, an ecryptfs issue or does KDE update the /dev/shm/ecryptfs-$USER-Private counter ? making it a KDE issue. I know ecryptfs has an auto mount/umount feature which is implemented in my setup e.g. the files /home/$USER/.ecryptfs/auto-mount (zero length file) and /home/$USER/.ecryptfs/auto-mount (zero length file) both exist. Is it because I'm sharing a folder via smb that doesn't require authentication and that's causing the discrepancy between the increment and decrement of the /dev/shm/ecryptfs-$USER-Private counter ? I know there are other options for accessing smb shares such as sftp etc but this problem also occurs by simply having a windows system on the same network, on the windows system you don't even need to access the share as I guess windows automatically looks around to see what else is on the network in the background. This causes a linux system to lose access to its encrypted home directory. This is a long standing issue going back years, 100% reproducible and has been seen on multiple versions of Kubuntu and also on KDE Neon which I'm now running. Any help appreciated.
Thanks for reporting this. We're currently doing a push for better Samba support and I'd like to see this included. Let me see if I can find some folks who can figure out what's going on here.
That's much appreciated. If you need any additional help or info let me know. Just to clarify, you don't need a windows systems on your network to produce this bug, The same issue occurs in a all Linux network. Just access your smb share from another KDE desktop using KIO smb:// in dolphin etc and watch your login counter deferment with each access.
Deferment=decrement. Sorry writing this on my phone! 😊
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone!
This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone!