Re: Privileges for read-only CephFS access?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 18, 2015 at 10:28 PM, Oliver Schulz <oschulz@xxxxxxxxxx> 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@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com




[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux