Groups | Search | Server Info | Login | Register


Groups > comp.os.linux.development.system > #82

Re: need to block changes to a file

From Rainer Weikusat <rweikusat@mssgmbh.com>
Newsgroups comp.os.linux.development.system
Subject Re: need to block changes to a file
Date 2011-04-13 11:16 +0100
Message-ID <874o62e9s0.fsf@sapphire.mobileactivedefense.com> (permalink)
References <32cc0688-fab0-411f-bd2b-261e7eef98b0@l2g2000prg.googlegroups.com>

Show all headers | View raw


zix <zixenus@gmail.com> writes:
>                         I have a file which I want to block any
> changes onto it. How may I accomplish that in kernel space through a
> module?  lets for example, I have some data in /var/carddetails.txt,
> which I dont want any user to not to delete that. He should be able to
> read/write, but not delete, move etc. Can anybody suggest me ways to
> do in linux?

Provided that append-only write access was ok for you and you are
using a filesystem which supports this, you could set the 'append
only' filesystem attribute for it. The userspace tools for these
attributes are lsattr and chattr. Judging from strace output, this is
implemtented via ioctl.

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

need to block changes to a file zix <zixenus@gmail.com> - 2011-04-13 02:28 -0700
  Re: need to block changes to a file Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-04-13 11:16 +0100
  Re: need to block changes to a file Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-04-13 18:05 +0000
    Re: need to block changes to a file Jonathan de Boyne Pollard <J.deBoynePollard-newsgroups@NTLWorld.COM> - 2011-04-20 18:42 +0100
    Re: need to block changes to a file Joe Pfeiffer <pfeiffer@cs.nmsu.edu> - 2011-04-20 12:42 -0600

csiph-web