I am working on an application written in C that needs to run executable files internally, because of the nature of the application I need to restrict the exe’s from reading or writing anything to the computer.
How would I be able to restrict the file from accessing or altering files on the computer?
By far the easiest way is to create a new user, with very few permissions, and then run the program as that user.
However, the method to do that differs depending on the system, linux you can run
useradd, and windows will almost certainly be possible through the windows api.