0

I have installed org.apache.netbeans with flatpak. Now, I want the app to have read-only access to /usr/local/bin. So it can run some binaries like lessc installed via npm.

In flatpak's docs it is explained that permission options may be added to the overrides.

The following permission options can also be added:

  • :ro - read-only access
  • :rw - read/write access (this is the default)
  • :create - read/write access, and create the directory if it doesn’t exist

So I tried this command:

sudo flatpak override --filesystems=/usr/local/bin:ro org.apache.netbeans

But I get this error:

error: Unknown option --filesystems=/usr/local/bin

How do I add the read-only option to the permission?

1 Answer 1

1

Okay, this was a stupid fail! the option should have been added with --filesystem - without the 's' at the end.

The correct command is:

sudo flatpak override --filesystem=/usr/local/bin:ro org.apache.netbeans

This command works and the result can be verified by running sudo flatpak info --show-permissions org.apache.netbeans.

Disclaimer
In Netbeans I still was not able to access the path, but that's the case because the /usr dir already exist in the sandbox. And is mounted in /var/run/host/usr.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.