On Wed, Feb 18, 2015 at 10:28 PM, Oliver Schulz <osch...@mpp.mpg.de> wrote:
> Dear Ceph Experts,
>
> is it possible to define a Ceph user/key with privileges
> that allow for read-only CephFS access but do not allow
> write or other modifications to the Ceph cluster?

Warning, read this to the end, don't blindly do as I say. :)

All you should need to do is define a CephX identity that has only r
capabilities on the data pool (assuming you're using a default
configuration where your CephFS uses the data and metadata pools):

sudo ceph auth get-or-create client.readonly mds 'allow' osd 'allow r
pool=data' mon 'allow r'

That identity should then be able to mount the filesystem but not
write any data (use "ceph-fuse -n client.readonly" or "mount -t ceph
-o name=readonly")

That said, just touching files or creating them is only a metadata
operation that doesn't change anything in the data pool, so I think
that might still be allowed under these circumstances.

However, I've just tried the above with ceph-fuse on firefly, and I
was able to mount the filesystem that way and then echo something into
a previously existing file. After unmounting, remounting, and trying
to cat that file, I/O just hangs. It eventually does complete, but
this looks really fishy.

So I believe you've uncovered a CephFS bug. :)

Cheers,
Florian
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to