Prevent unauthorised write access to a part of filesystem or partition

Posted by gaurav on Stack Overflow See other posts from Stack Overflow or by gaurav
Published on 2011-11-29T17:11:11Z Indexed on 2011/11/29 17:50 UTC
Read the original article Hit count: 208

Filed under:
|
|
|
|

Hello all I have some very important system files which I want to protect from accidental deletion even by root user. I can create a new partition for that and mount it with readonly access but the problem is that I want my application which handles those system files to have write access to that part and be able to modify them. Is that possible using VFS? As VFS handles access to the files I could have a module inserted in the VFS layer which can see if there is a write access to that part then see the authorization and allow it or otherwise reject it. If not please provide me suggestions regarding how can such a system be implemented what would I need in that case. If there exists a system like this please suggest about them also. I am using linux and want to implement this in C, I think it would be possible in C only. Edit: There are such kind of programs implemented in windows which can restrict access to administrator even, to some important folders, would that be possible in linux?

© Stack Overflow or respective owner

Related posts about c

    Related posts about linux