Date: Mon, 18 Apr 2005 22:42:40 +0200 From: Roland Smith <rsmith@xs4all.nl> To: freebsd-questions@freebsd.org Cc: prasadam kumar <prasadamkumar@yahoo.com> Subject: Re: how to make my RAID device WORM(write once and read many) Message-ID: <20050418204240.GA54808@slackbox.xs4all.nl> In-Reply-To: <441x98z02z.fsf@be-well.ilk.org> References: <20050418054125.55091.qmail@web31702.mail.mud.yahoo.com> <441x98z02z.fsf@be-well.ilk.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--pf9I7BMVVzbSWLtt
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Mon, Apr 18, 2005 at 09:27:48AM -0400, Lowell Gilbert wrote:
> Please don't top-post.
>=20
> prasadam kumar <prasadamkumar@yahoo.com> writes:
>=20
> > 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 followin=
g:
- 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
--=20
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
--pf9I7BMVVzbSWLtt
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (FreeBSD)
iD8DBQFCZBvAEnfvsMMhpyURAvDgAKCEgYTcCdVAti2jXuQFFJGqZkVL+wCfaIEF
tjczBB7BIeqfufFcgq0MaDc=
=msPV
-----END PGP SIGNATURE-----
--pf9I7BMVVzbSWLtt--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050418204240.GA54808>
