Score:0

Hide files and folders from specific apps only

cn flag

I want to make a folder invisible to just one specific application. Is there any way to do that? I want the folder to be visible to everything else on the system, just not the one specific application.

David avatar
cn flag
Why? Are there multiple users on the system? A bit more info may help us to help you.
Lite Riyusaki avatar
cn flag
No, I just don't want a specific app to know that a specific folder exists. For example, I don't want a game to find certain files or folders on system even though they are present.
raj avatar
cn flag
raj
It depends on the folder structure. If for example all files or folders you want to hide are inside a specific parent folder (say `/a`), a possible solution might be to create a specific user for running the application (you can even set the application setuid to that user) and a specific group for that user, assign the folder `/a` to this group and set NO group permissions for that folder - thus, members of group `/a` could not look inside that folder.
Lite Riyusaki avatar
cn flag
Thanks, I will try this.
Score:2
cn flag

The way to prevent applications from seeing the entire system is to sandbox them. One easy way to do this is by launching it with firejail. With Firejail, you start a program in a confined environment. For each application, you can define rules what the program is allowed to do and what not. This includes restricting access to specific folders.

Firejail is available in the standard Ubuntu repositories.

Lite Riyusaki avatar
cn flag
I see, sounds great. Thanks much.
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.