I recently updated a chroot on an old Chromebook from Ubuntu bionic to focal. The chroot has encryption enabled.
I usually work with Git repositories and other files within the Chrome's Downloads folder and haven't had any issues with this previously.
Since the update though, I found I was unable to run things like git clone -- I get an error saying cannot create worktree dir: no such file found. I looked around and found people had similar problems but there's been no clear solution.
Then I decided to look inside one of the existing folders within Downloads and noticed a problem there...
- I can open a repo within my Downloads folder on ChromeOS and see all files as I used to.
- I can enter-chroot and run
lson the same folder and see all files as I used to there too. - But when I launch the chroot/crouton (I used
xfce4), and try tolsthe folder from within the terminal, or even look at the folder contents from a UI window, the contents of the repo look encrypted -- as in all the filenames have changed to strings of equal-length and apparently random characters.
It's almost as if encryption is working in reverse -- so my files are unencrypted outside the crouton, but as soon as I go into the xfce UI, they're encrypted and there's no decryption happening. But that's speculation on my part...
Any ideas as to what is going on here? And how I can continue to work within crouton?
It seems this is to do with the fact that Chrome OS encrypts files and that something had happened since I updated Crouton (rather than my updating Ubuntu from Bionic to Focal).
I realised this was a bigger issue when even command line tools like
tarandgit(which I'd installed) weren't working.When I tried to unpack a download of Firefox with
tar xjfI got an error saying "Required key not available". Some searching around that led me to issue #3261 on the Crouton Github repo.The solution for me was:
ls -l /etc/pam.d/su-lto check but ultimately usedsudo...)/etc/pam.d/su-l. (I usedsudo vi /etc/pam.d/su-lto ensure the file wasn't read-only in that instant, and because I had no other text editor options butviavailable.)session optional pam_keyinit.so force revoke. (So it should read# session optional pam_keyinit.so force revoke.