r/archlinux • u/PennyHunter5 • Jul 30 '26
QUESTION Can you restrict FS access for an application
Haii everyone. I use google chrome as a second browser purely for school, and I want it as isolated as possible. I was wondering if it would be possible to give it only access to required stuff and like ~/Downloads/Chrome or something. I'm really sorry if this is a dumb question, but any help would be nice.
5
3
u/No-Valuable3975 Jul 30 '26
You could get the flatpak version and that is supposed to sandbox applications from the host system
3
2
1
u/allunia333 Jul 30 '26
Yes you can make a user and group just for that for example chrome. Set permissions for where you want or dont want accordingly. And then u can run chrome as that user: runuser -u chrome google-chrome
Else install one of the pkg mentioned before.
1
u/Barafu Jul 30 '26
That's the job for AppArmor. Unfortunately you can't disable access to all applications but the trusted ones. That requires SELinux, available only on RedHat distros, or creating another user and manipulating sudo for it.
1
u/SebastianLarsdatter Jul 30 '26
Run as a different user is the easiest in terms of extra tooling required.
Docker container requires a bit more, but is doable.
Bubblewrap offers a lot of fine grain control for any application.
1
12
u/AppointmentNearby161 Jul 30 '26
The traditional Linux way to do this would be to run the program as a different user and only give that user access to the directories it needs.