All of lore.kernel.org
 help / color / mirror / Atom feed
* Write-once file system
@ 2003-06-27 15:43 Fong Vang
  2003-06-27 15:46 ` Oleg Drokin
  2003-06-27 15:48 ` Hans Reiser
  0 siblings, 2 replies; 22+ messages in thread
From: Fong Vang @ 2003-06-27 15:43 UTC (permalink / raw)
  To: 'reiserfs-list@namesys.com'

We rely heavily on reiserfs for some of our critical file systems.  I'm just
wondering what work would be involved and how difficult it would be to add
an option (perhaps at mount time) to reiserfs that will allow a file to be
written only once, i.e. once a file is created it should not be allowed to
be modified or deleted (including the inode).  We may consider paying for
this modification.



This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Write-once file system
@ 2003-06-27 16:07 Fong Vang
  2003-06-27 16:20 ` Oleg Drokin
  2003-06-27 17:00 ` Andreas Dilger
  0 siblings, 2 replies; 22+ messages in thread
From: Fong Vang @ 2003-06-27 16:07 UTC (permalink / raw)
  To: 'Hans Reiser'; +Cc: 'reiserfs-list@namesys.com'

Once the write to the file is CLOSED the file should not be modifiable in
any way.  It should not be writeable by root.  Ideally, this should be
across reboot and across kernel.  The current requirement is that as long as
the modified kernel/reisefs is being used then it should NOT be modifiable
(if a kernel allowing modification is used then it could allow
modifications).

-----Original Message-----
From: Hans Reiser [mailto:reiser@namesys.com]
Sent: Friday, June 27, 2003 8:49 AM
To: Fong Vang
Cc: 'reiserfs-list@namesys.com'
Subject: Re: Write-once file system


Fong Vang wrote:

>We rely heavily on reiserfs for some of our critical file systems.  I'm
just
>wondering what work would be involved and how difficult it would be to add
>an option (perhaps at mount time) to reiserfs that will allow a file to be
>written only once, i.e. once a file is created it should not be allowed to
>be modified or deleted (including the inode).  We may consider paying for
>this modification.
>
>
>
>This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
>service.  For more information, visit us at www.zantaz.com. 
>IMPORTANT: This electronic mail message is intended only for the use of the
>individual or entity to which it is addressed and may contain information
>that is privileged, confidential or exempt from disclosure under applicable
>law.  If the reader of this message is not the intended recipient, or the
>employee or agent responsible for delivering this message to the intended
>recipient, you are hereby notified that any dissemination, distribution or
>copying of this communication is strictly prohibited.  If you have received
>this communication in error, please notify the sender immediately by
>telephone or directly reply to the original message(s) sent.  Thank you.
>
>
>  
>
Do you intend to first write it, and then indicate that it should no 
longer be modifiable?  Or do you want it to be unmodifiable as it is 
being appended to?  Do you want it to be safe from root?  Do you want it 
to be safe from rebooting to a new kernel?

-- 
Hans



This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Write-once file system
@ 2003-06-27 16:07 Fong Vang
  0 siblings, 0 replies; 22+ messages in thread
From: Fong Vang @ 2003-06-27 16:07 UTC (permalink / raw)
  To: 'Oleg Drokin'; +Cc: 'reiserfs-list@namesys.com'

it should be mandantory.  root should not be able to change it.

-----Original Message-----
From: Oleg Drokin [mailto:green@namesys.com]
Sent: Friday, June 27, 2003 8:46 AM
To: Fong Vang
Cc: 'reiserfs-list@namesys.com'
Subject: Re: Write-once file system


Hello!

On Fri, Jun 27, 2003 at 08:43:06AM -0700, Fong Vang wrote:
> We rely heavily on reiserfs for some of our critical file systems.  I'm
just
> wondering what work would be involved and how difficult it would be to add
> an option (perhaps at mount time) to reiserfs that will allow a file to be
> written only once, i.e. once a file is created it should not be allowed to
> be modified or deleted (including the inode).  We may consider paying for
> this modification.

Is the extended attributes support (man chattr) does what you want by any
chance?

Bye,
    Oleg


This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Write-once file system
@ 2003-06-27 16:53 Fong Vang
  2003-06-27 17:09 ` Jason Holt
  0 siblings, 1 reply; 22+ messages in thread
From: Fong Vang @ 2003-06-27 16:53 UTC (permalink / raw)
  To: 'Oleg Drokin'
  Cc: 'Hans Reiser', 'reiserfs-list@namesys.com'

I don't think turning the write option off during write is a good idea.  All
file systems running reiserfs should make the file write-once.  File systems
that do need to be rewriteable will use ext3 or something else (that's how
we do it now anyway).

Could it done in such a way that even root can't write (not even when using
block devices)?

-----Original Message-----
From: Oleg Drokin [mailto:green@namesys.com]
Sent: Friday, June 27, 2003 9:20 AM
To: Fong Vang
Cc: 'Hans Reiser'; 'reiserfs-list@namesys.com'
Subject: Re: Write-once file system


Hello!

On Fri, Jun 27, 2003 at 09:07:05AM -0700, Fong Vang wrote:
> Once the write to the file is CLOSED the file should not be modifiable in
> any way.  It should not be writeable by root.  Ideally, this should be
> across reboot and across kernel.  The current requirement is that as long
as
> the modified kernel/reisefs is being used then it should NOT be modifiable
> (if a kernel allowing modification is used then it could allow
> modifications).

So basically do you think it would be better for you to have "write-once
flag" in superblock
that will make all files to be unwritable (except newly created ones) as
opposed to a simple
mount option that you'd use for filesystems with non-changeable files?
(you need to mark filesystems that are in write-once mode somehow, because I
think
you do not need all reiserfs filesystems to be run in this mode, right?)
Also concerning the "root should not be able to change the files", root
will be able to overwrite files by using block devices if he'd want to.

Bye,
    Oleg


This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Write-once file system
@ 2003-06-27 17:07 Fong Vang
  2003-06-27 17:27 ` 'Andreas Dilger'
  2003-06-27 17:42 ` Oleg Drokin
  0 siblings, 2 replies; 22+ messages in thread
From: Fong Vang @ 2003-06-27 17:07 UTC (permalink / raw)
  To: 'Andreas Dilger'
  Cc: 'Hans Reiser', 'reiserfs-list@namesys.com'

this doesn't seem to work on kernel 2.4.20.  I did a chattr +i on file but
rm -rf (as root) on the file deletes it.


-----Original Message-----
From: Andreas Dilger [mailto:adilger@clusterfs.com]
Sent: Friday, June 27, 2003 10:01 AM
To: Fong Vang
Cc: 'Hans Reiser'; 'reiserfs-list@namesys.com'
Subject: Re: Write-once file system


On Jun 27, 2003  09:07 -0700, Fong Vang wrote:
> Once the write to the file is CLOSED the file should not be modifiable in
> any way.  It should not be writeable by root.  Ideally, this should be
> across reboot and across kernel.  The current requirement is that as long
as
> the modified kernel/reisefs is being used then it should NOT be modifiable
> (if a kernel allowing modification is used then it could allow
> modifications).

Sounds like "immutable" (chattr +i) support is what you want.  It looks
like reiserfs already supports this.  Even root can not overwrite or delete
an immutable file, but could disable the immutable flag first (chattr -i)
before doing so.  Regular users can never disable the immutable flag once
set without the CAP_LINUX_IMMUTABLE capability.  However, it looks like
the reiserfs code has a bug there - any user can clear the immutable flag
(see ext[23]_ioctl() for proper permission check).

In BSD (AFAIK), removing the immutable flag requires that you be booted
into runlevel 1 (single user) but in Linux it can currently be done at any
time, although I imagine it would be pretty easy to fix that.

You should be able to set the immutable flag on a directory and have it
inherited by all files created in that directory.

> Fong Vang wrote:
> >We rely heavily on reiserfs for some of our critical file systems.  I'm
> >wondering what work would be involved and how difficult it would be to
add
> >an option (perhaps at mount time) to reiserfs that will allow a file to
be
> >written only once, i.e. once a file is created it should not be allowed
to
> >be modified or deleted (including the inode).  We may consider paying for
> >this modification.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
* RE: Write-once file system
@ 2003-06-27 17:21 Fong Vang
  2003-06-27 17:37 ` Jason Holt
  0 siblings, 1 reply; 22+ messages in thread
From: Fong Vang @ 2003-06-27 17:21 UTC (permalink / raw)
  To: 'Jason Holt'
  Cc: 'Oleg Drokin', 'Hans Reiser',
	'reiserfs-list@namesys.com'

Physical access to the machine is a separate issue which we're already
addressing with biometrics and other measures.

Could root be disabled completely?  I haven't tried this before so I don't
know what impact disabling root on the system would do.

-----Original Message-----
From: Jason Holt [mailto:jason@lunkwill.org]
Sent: Friday, June 27, 2003 10:09 AM
To: Fong Vang
Cc: 'Oleg Drokin'; 'Hans Reiser'; 'reiserfs-list@namesys.com'
Subject: RE: Write-once file system



On Fri, 27 Jun 2003, Fong Vang wrote:

> I don't think turning the write option off during write is a good idea.
All
> file systems running reiserfs should make the file write-once.  File
systems
> that do need to be rewriteable will use ext3 or something else (that's how
> we do it now anyway).
> 
> Could it done in such a way that even root can't write (not even when
using
> block devices)?
[...]

The trick is that root controls the kernel, and the kernel talks directly to
the hardware.  That's all a block device is - (mostly) direct hardware
access.

So what you're asking for is something beyond root's control that can tell
him
"no" when he asks to write to an immutable file.

Hardware would be one such option - a disk which knows what has been written
and will refuse to write over it.

A separate machine would be another, serving up a write-once filesystem over
a
network.

It might even be possible to have two virtual machines on the same box.  
User-mode linux, for instance, lets you create a virtual linux box on a
machine - you have root on the virtual machine, but not necessarily on the
real one.  Obviously, somebody else will have to be the "real" root, and
they'd be able to access the real block devices.  And of course, anybody
that
has physical access to a box can almost certainly gain root on it.

					-J


This e-mail has been captured and archived by the ZANTAZ Digital Safe(tm)
service.  For more information, visit us at www.zantaz.com. 
IMPORTANT: This electronic mail message is intended only for the use of the
individual or entity to which it is addressed and may contain information
that is privileged, confidential or exempt from disclosure under applicable
law.  If the reader of this message is not the intended recipient, or the
employee or agent responsible for delivering this message to the intended
recipient, you are hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If you have received
this communication in error, please notify the sender immediately by
telephone or directly reply to the original message(s) sent.  Thank you.

^ permalink raw reply	[flat|nested] 22+ messages in thread
[parent not found: <20030627225410.GK31002@jensbenecke.de>]

end of thread, other threads:[~2003-06-28  9:48 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-27 15:43 Write-once file system Fong Vang
2003-06-27 15:46 ` Oleg Drokin
2003-06-27 15:48 ` Hans Reiser
  -- strict thread matches above, loose matches on Subject: below --
2003-06-27 16:07 Fong Vang
2003-06-27 16:20 ` Oleg Drokin
2003-06-27 17:00 ` Andreas Dilger
2003-06-27 16:07 Fong Vang
2003-06-27 16:53 Fong Vang
2003-06-27 17:09 ` Jason Holt
2003-06-27 18:03   ` Russell Coker
2003-06-27 18:41   ` bscott
2003-06-27 17:07 Fong Vang
2003-06-27 17:27 ` 'Andreas Dilger'
2003-06-27 17:43   ` Oleg Drokin
2003-06-27 17:42 ` Oleg Drokin
2003-06-27 17:21 Fong Vang
2003-06-27 17:37 ` Jason Holt
2003-06-27 18:30   ` Russell Coker
2003-06-27 19:48     ` Jason Holt
     [not found] <20030627225410.GK31002@jensbenecke.de>
2003-06-28  3:28 ` Mike Young
2003-06-28  7:45 ` Jason Holt
2003-06-28  9:48   ` Russell Coker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.