How to forbid access file from browser

Example : https://localhost/file=/private_file
How can i close the access file function when accessing from the browser? It seems that all the files can be access if I launched the gradio app with root

Hi and welcome to the community!

It sounds like AppArmor could be a solution for you. Using profiles you can define what files and directories a program can read, write, and execute.
For Gradio, you can craft a profile specifying which directories and files it can and cannot access.

Other ideas could be SELinux and chroot.