limiting access to stored files

87 views Asked by At

I'm writing an application that stores some files in Java.
The application has 4 hierarchical access levels (each access level can view lower and can't view upper level).
I need to protect these stored files against two scenarios:

  1. Direct access from disk itself by everyone.
  2. Access to files without appropriate access level.

I'm not going to use OS users to limit access (Access levels should be managed in application).
each files can has more than 1GB size so I think encrypting each file is not a good idea. (?)

What is the solution?

1

There are 1 answers

1
vladimir e. On

if you want to prevent access to the files then you need to use OS file permissions.

you can use encryption to prevent other users reading the contents of the files, but that will not stop them moving / deleting / overwriting them.

at least you will need to create an OS account for your application which is the only account that can access the files. then you can manage your different access levels within the app as you wish.