1

If I have a disk mounted on my hard-drive, I want to be able to block all but specific processes from having read/write access to that disk. Currently, I'm thinking the best way is to audit the disk and kill the processes when seen accessing files in the disk, but are there any methods to stop those processes before they actually access them?

Edit 1:

Let me elaborate with an example. For example, I might want to block all processes from reading from and writing to a mounted disk except vim. So, if an unauthorized user calls touch /mnt/mounteddisk/foo then I would block that.

I would also assume that there's a big difference between having access to a disk and having access to files inside the disk. For example, the former would block calling ls on the mounted disk directory, and the latter wouldn't. But the latter could block vim trying to read a file inside the disk. I am currently looking for the former.

  • more easy way to run processes with user who doesn't have any permission on mounted partition. – Ipor Sircer Nov 16 '16 at 9:21
  • The answer depends on the actual problem you need to solve. Do you want to prevent unauthorized users from accessing the files? Prevent the file indexer from reading the disk? – Mark Plotnick Nov 16 '16 at 12:06
  • To prevent unauthorized users i believe. But i dont know what a file indexer is – CuriousKimchi Nov 16 '16 at 13:24
  • But im not just trying to prevent users. Even if the user has read/write privileges i want to allow only specific actions. For example i might only want to allow the "vi" process to be able to read or write files – CuriousKimchi Nov 16 '16 at 13:35
  • What OS will you be using? – Mark Plotnick Nov 16 '16 at 23:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.