Project

General

Profile

Backport #22569

Updated by Nathan Cutler over 6 years ago

https://github.com/ceph/ceph/pull/19795 I do path restriction follow:http://docs.ceph.com/docs/master/cephfs/client-auth/ 
 <pre> 
 [root@node181 ~]# ceph auth get-or-create client.foo mon 'allow r' mds 'allow r, allow rw path=/bar' osd 'allow rw pool=data' 
 [client.foo] 
         key = AQBGpqFXTCDnJhAAdF1TNwBFQVo0gAT8ce2gFg== 
 </pre> 


 But with the following error when mount 
 <pre> 
 [root@node181 ~]# ceph-fuse -n client.foo /root/mycephfs -r /bar 
 2016-08-03 16:13:02.449385 7f0d24b27e80 -1 init, newargv = 0x7f0d3035dd30 newargc=11 
 ceph-fuse[13696]: starting ceph client 
 2016-08-03 16:13:02.449739 7f0d24b27e80 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.foo.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin: (2) No such file or directory 
 2016-08-03 16:13:02.449754 7f0d24b27e80 -1 monclient(hunting): ERROR: missing keyring, cannot use cephx for authentication 
 ceph-fuse[13696]: ceph mount failed with (2) No such file or directory 
 ceph-fuse[13694]: mount failed: (2) No such file or directory 
 </pre> 


 if I add generated files into the /etc/ceph/ceph.client.*client_name*.keyring, 
 it's mount successful 
 <pre> 
 [root@node181 ~]# ceph auth get-or-create client.foo mon 'allow r' mds 'allow r, allow rw path=/bar' osd 'allow rw pool=data' > /etc/ceph/ceph.client.foo.keyring 


 [root@node181 ~]# ceph-fuse -n client.foo /root/mycephfs -r /bar 
 2016-08-03 16:19:28.294400 7f753f114e80 -1 init, newargv = 0x7f7548c0bd30 newargc=11ceph-fuse[13914]: starting ceph client 

 ceph-fuse[13914]: starting fuse 
 </pre> 

Back