D
D
Distemii2020-02-23 08:40:40
linux
Distemii, 2020-02-23 08:40:40

Restricting access to a java program?

I have such a question - how to restrict access to a java program in all places except for the folder to which the file is located and the folders and files that belong to it?

Example:
-Servers
--Loader.jar
-ServerMaxic
--modder.jar
--cfg.json
--DirectoryDira
---...

And how do I make modder.jar not have access to directories other than ServerMaxic and nested in it files / folders, etc. via bash/sh?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Korotenko, 2020-02-23
@Distemii

Create a user from which you will run the program.
Create a folder where the data will be.
Do a chmod on the data folder
if that's not enough install SELINUX

D
Dmitry, 2020-02-23
@q2digger

Wrap your program in a docker container.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question