Score:0

How can I restrict a snap application to /home/user/somedir?

vc flag

I would like to allow a snap application to read and write files to /home/user/somedir and restrict the user's ability to read and write files in home/user/otherdir. The application cannot be repackaged, so the solution must come from snap itself or some workaround.

It seems fairly obvious that currently it is technically unfeasible to do this for arbitrary filesystem directories like /arbitrary/directory/tree without workarounds not involving snap.

I understand that there are general workarounds, for example running the snap as a dummy user or in a container and using bind-mount to provide access to only /home/user/somedir.

Have I missed a simpler solution in this case?

It seems to me that the technical limitations noted above may not apply, as we need to take away filesystem access provided by :home rather than provide them.

David avatar
cn flag
What is the app? What version of Ubuntu are you using?
Patrick R avatar
vc flag
Firefox and Ubuntu 22.04.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.