All of lore.kernel.org
 help / color / mirror / Atom feed
* Different options for subdir? Possible?
@ 2010-05-15 13:31 Pierre Ossman
       [not found] ` <20100515153104.51f5e4ab-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ossman @ 2010-05-15 13:31 UTC (permalink / raw)
  To: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

I'd like to export the filesystem /exports as ro, but the
subdir /exports/dump as rw. I can't seem to get it to work though, so
before I start digging deeper I figured I might ask if this is even
possible? :)

I tried this in /etc/exports:

/exports/dump	1.2.3.4(rw)
/exports	1.2.3.4(ro)

Rgds
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by FRA, a
  Swedish intelligence agency. Make sure your server uses
  encryption for SMTP traffic and consider using PGP for
  end-to-end encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Different options for subdir? Possible?
       [not found] ` <20100515153104.51f5e4ab-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
@ 2010-05-17 20:49   ` J. Bruce Fields
  2010-05-18 17:34     ` Pierre Ossman
  0 siblings, 1 reply; 4+ messages in thread
From: J. Bruce Fields @ 2010-05-17 20:49 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: linux-nfs

On Sat, May 15, 2010 at 03:31:04PM +0200, Pierre Ossman wrote:
> I'd like to export the filesystem /exports as ro, but the
> subdir /exports/dump as rw. I can't seem to get it to work though, so
> before I start digging deeper I figured I might ask if this is even
> possible? :)

If the "dump" subdirectory is a subdirectory of the same filesystem (not
a mountpoint), and if you're using NFSv4 (or v2/v3 with crossmnt), the
client will continue to use the export options on the parent directory.

Also, note that it's relatively easy for someone with access to the
network to treat all of /exports as rw.

In general, export points that aren't mountpoints are not usually a good
idea.

--b.

> 
> I tried this in /etc/exports:
> 
> /exports/dump	1.2.3.4(rw)
> /exports	1.2.3.4(ro)
> 
> Rgds
> -- 
>      -- Pierre Ossman
> 
>   WARNING: This correspondence is being monitored by FRA, a
>   Swedish intelligence agency. Make sure your server uses
>   encryption for SMTP traffic and consider using PGP for
>   end-to-end encryption.



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Different options for subdir? Possible?
  2010-05-17 20:49   ` J. Bruce Fields
@ 2010-05-18 17:34     ` Pierre Ossman
       [not found]       ` <20100518193445.0c8dbc17-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre Ossman @ 2010-05-18 17:34 UTC (permalink / raw)
  To: J. Bruce Fields; +Cc: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]

On Mon, 17 May 2010 16:49:47 -0400
"J. Bruce Fields" <bfields@fieldses.org> wrote:

> On Sat, May 15, 2010 at 03:31:04PM +0200, Pierre Ossman wrote:
> > I'd like to export the filesystem /exports as ro, but the
> > subdir /exports/dump as rw. I can't seem to get it to work though, so
> > before I start digging deeper I figured I might ask if this is even
> > possible? :)
> 
> If the "dump" subdirectory is a subdirectory of the same filesystem (not
> a mountpoint), and if you're using NFSv4 (or v2/v3 with crossmnt), the
> client will continue to use the export options on the parent directory.
> 

Hmm... client? Can't say I'm intimate with the NFS protocol, but access
permissions like this seems like a server decision.

> Also, note that it's relatively easy for someone with access to the
> network to treat all of /exports as rw.

Even with subtree check?

> In general, export points that aren't mountpoints are not usually a good
> idea.

Fair enough. I'll have to figure something else out.

Thanks
-- 
     -- Pierre Ossman

  WARNING: This correspondence is being monitored by FRA, a
  Swedish intelligence agency. Make sure your server uses
  encryption for SMTP traffic and consider using PGP for
  end-to-end encryption.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Different options for subdir? Possible?
       [not found]       ` <20100518193445.0c8dbc17-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
@ 2010-05-18 18:24         ` J. Bruce Fields
  0 siblings, 0 replies; 4+ messages in thread
From: J. Bruce Fields @ 2010-05-18 18:24 UTC (permalink / raw)
  To: Pierre Ossman; +Cc: linux-nfs

On Tue, May 18, 2010 at 07:34:45PM +0200, Pierre Ossman wrote:
> On Mon, 17 May 2010 16:49:47 -0400
> "J. Bruce Fields" <bfields@fieldses.org> wrote:
> 
> > On Sat, May 15, 2010 at 03:31:04PM +0200, Pierre Ossman wrote:
> > > I'd like to export the filesystem /exports as ro, but the
> > > subdir /exports/dump as rw. I can't seem to get it to work though, so
> > > before I start digging deeper I figured I might ask if this is even
> > > possible? :)
> > 
> > If the "dump" subdirectory is a subdirectory of the same filesystem (not
> > a mountpoint), and if you're using NFSv4 (or v2/v3 with crossmnt), the
> > client will continue to use the export options on the parent directory.
> > 
> 
> Hmm... client? Can't say I'm intimate with the NFS protocol, but access
> permissions like this seems like a server decision.

Yes, apologies for the imprecise language.

> > Also, note that it's relatively easy for someone with access to the
> > network to treat all of /exports as rw.
> 
> Even with subtree check?

If you turn on subtree_check, you're safe.  (That can cause other
problems, though, due to filehandles changing on cross-directory
rename.)

--b.

> > In general, export points that aren't mountpoints are not usually a good
> > idea.
> 
> Fair enough. I'll have to figure something else out.
> 
> Thanks
> -- 
>      -- Pierre Ossman
> 
>   WARNING: This correspondence is being monitored by FRA, a
>   Swedish intelligence agency. Make sure your server uses
>   encryption for SMTP traffic and consider using PGP for
>   end-to-end encryption.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-05-18 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-15 13:31 Different options for subdir? Possible? Pierre Ossman
     [not found] ` <20100515153104.51f5e4ab-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
2010-05-17 20:49   ` J. Bruce Fields
2010-05-18 17:34     ` Pierre Ossman
     [not found]       ` <20100518193445.0c8dbc17-OhHrUh4vRMS8I+09wXhka4dd74u8MsAO@public.gmane.org>
2010-05-18 18:24         ` J. Bruce Fields

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.