https://bugs.kde.org/show_bug.cgi?id=397778
Bug ID: 397778 Summary: SMB access causes ecryptfs counter /dev/shm/ecryptfs-$USER-Private to decrement but not increment causing KDE apps to lose access to home directory Product: kwallet-pam Version: 5.12.6 Platform: Neon Packages OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: plasma-b...@kde.org Reporter: nick.craig....@gmail.com Target Milestone: --- 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. -- You are receiving this mail because: You are watching all bug changes.