On Mon, Apr 18, 2005 at 09:27:48AM -0400, Lowell Gilbert wrote:
> Please don't top-post.
> 
> prasadam kumar <[EMAIL PROTECTED]> writes:
> 
> > Thanks for responding to my query,
> > actually it is a raid5 storage device it contains
> > firewire and usb ports, through this
> > interface a user can store data to the  raid5 device
> > irrespective of file system.
> > once he copied data to the device it should be
> > immutable(i.e cannot be modify and delete).
> > Can u suggest any approach to achieve this task.

If it's OK to invoke a shell-script to do the archiving, and if you're
using UFS it would be possible, I think. That script should do the following:

- check for name clashes (abort with an error if a file already exists).
- copy the file to the target disk.
- chmod ugo-w the file to remove all write permissions.
- chflags schg,sunlnk,uchg,uunlnk <file>

Of course this is not foolproof, because the superuser can change the
flags and permissions.

Another option would be to use a revision control system that can handle
arbitrary files like subversion. If you write ("commit") a new version
of a file, the old version is not lost. This also supposes that you
create a wrapper script to make things easier (because the first write
has to be an "add" rather than a "commit", and other details like
creating directories etc).

Roland
-- 
R.F. Smith                           /"\    ASCII Ribbon Campaign
r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in e-mail
http://www.xs4all.nl/~rsmith/         X     No Word docs in e-mail
public key: http://www.keyserver.net / \    Respect for open standards

Attachment: pgpTYJhwAhBXS.pgp
Description: PGP signature

Reply via email to