-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't lock folders encrypted with fscrypt #402
Comments
Does Also, did you assign the same encryption policy to multiple directories, using |
I just used regular Even unlocking and trying to lock after doing nothing, not opening files or even doing ls/cd into folder, doesn't work. |
Can you check which file it is that is still in use? Try |
Edit: I have since tried the other fscrypt encrypted folders that I have and they lock properly, even though I can view, open and close the files as much as I want. Now I created a new fscrypt encrypted folder (test3), created a text file with random words on it, viewed it and successfully locked it. Then I unlocked it and downloaded a wallpaper in it, viewed it and tried to lock it. Same issue. |
Hmmm this is very weird, I'm wondering if some process running as root is somehow holding onto a reference to one of the files. When you ran |
I did not run
So I'm trying to understand what could possibly be doing this. Here's what I've tried so far.
That is just the new test folder I created. The main folder that I'm trying to lock, the reason I made this issue report is different. It immediately fails to lock after unlocking. Doesn't matter if I open it or not. |
There has to be something that is holding a reference to one of the files. Technically, this doesn't necessarily mean that a file is "open" -- it could also be a process that has its current directory inside the directory or a kernel driver that has an internal reference to one of the files. I wonder what is different about case (13)? Maybe GNOME GVfs could be involved? |
I deleted the two folders that was "still busy after removing key" with inum 475592 and 483455. I still can't lock it. Now it shows a completely different folder when I query with dmesg, inum 483458. When I did the original dmesg query, it did not show 483458 as "still busy after removing key", only showed the above two (475592 and 483455), now that I've deleted them it shows this folder. I feel like when I delete this folder too, it'll just choose another folder and it'll just keep going until there is nothing left, no folders or files. Maybe it won't be able to lock even then. As I've demonstrated above, I don't think creating a brand new folder and encrypting that will help either. As eventually something will prevent it from locking too. |
After creating and encrypting a directory, I get the same error when trying to lock. Have you found a fix? These are the commands I ran: ~ sudo fscrypt setup lsof and fuser both did not show any processes keeping the file open. Some system info: |
I think I found the culprit. I have file indexing for file search enabled in the KDE settings. After killing the associated process called baloo_file, fscrypt locks successfully. I have not found any references mentioning that file indexing may interfere with fscrypt locking, so it does not seem to be a common issue. |
I'm no programmer but I found that once I restart the computer the files are locked. They just appear as a bunch of characters but this is only after I log in again. |
|
I have multiple folders encrypted with fscrypt in various directories. They have various files in them (images, videos, text). I open a file and close it with Ctrl+Q. Then I want to lock the folder with
fscrypt lock test/
, however it always fails. Doesn't matter which folder or which file.Running
find "test/" -print0 | xargs -0 fuser -k
as user I get:Running it as root I don't get the permission denied error. However, re-running
fscrypt lock test/
still doesn't work. I make sure I close all files I open with Ctrl+Q. The thumbnails for the files are already generated. When it is "locked" in this state, I can see all the folder names and files, even the thumbnails, but I can't actually open or view any of them.This is what
fscrypt status test/
says:Arch Linux
linux 6.7.4.arch1-1
fscrypt version v0.3.4
When I reboot, the folders are properly locked and nothing inside is visible. But unlocking results in the same issue. Have to keep rebooting.
The text was updated successfully, but these errors were encountered: