Crostini Seemingly Gaining Direct File Access In Chrome OS

Google Chromebook owners who frequently have to work with Linux applications can attest that one of the biggest limitations of the Crostini Linux container is that it does not have direct access to the device’s file system, but it seems that this may be changing soon. The way things work now forces files generated in the Crostini container to stay there, and keeps users from using local files inside the container’s application. A workaround is available via SSH, but it can be cumbersome. A recent code commit in the Chromium repository points to Google using Crostini’s built-in SSH and a pre-built action library to create an easier solution, essentially giving Crostini file access privileges to and from the Chromebook.

Having a look at the code commit itself, it seems that each container instance in Crostini will receive its own private key, which will be called when trying to access the Chrome OS file system. The Crostini container will also be added to a list of “known hosts”. While the commit and its comments don’t explain that in detail, it’s likely safe to assume that it means Chrome OS will recognize an authorized Crostini instance and allow access if the private key checks out. From there, a mount command is issued that will directly mount the Chrome OS file system in the Crostini container, essentially giving the Linux application access to it as if it were a flash drive being inserted into a Linux PC.

This approach, overall, is quite secure, and could lead to far fewer headaches compared to trying to integrate the file system of the particular Crostini instance directly with Chrome OS. It also uses hooks and calls that are already present in both Crostini and Chrome OS, which means that once the solution is ready, Google could flip the switch at any time. Likewise, once the commit is live, enterprising users who know how to compile Chrome OS or any of its offshoots by hand could include this change to give Crostini the access that it needs in order to have Linux applications interact with local files. While one could argue that dealing with local files is less of a headache in Crouton, using Crostini for one-off application usage or testing can be far less cumbersome than setting up an entire shell session and OS in Crouton, for users who typically work in the Chrome OS environment and use Linux applications less often, or don’t want to deal with the intricacies of introducing new file systems and hooks into an established Linux virtual machine.

error: Content is protected !!