Re: Cannot execute rados.py with sudoer

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

 



This looks like your standard permissions issue to me. The keyring and
log were probably created by mkcephfs running under sudo? But if you
give your current user the ability to read/write from them everything
should work fine.
-Greg

On Wed, Nov 2, 2011 at 8:55 PM,  <Eric_YH_Chen@xxxxxxxxxxx> wrote:
> Hi, all:
>
>    When I use raods.py, I met some problem even if the user is in sudoer.
>   I found it would access /etc/ceph/client.admin.keyring and /var/log/ceph/client.admin.log which is only available to root.
>         Do you have any suggestion? I cannot execute the python problem with “root” account. It would cause some security issue.
>         Thanks a lot!
>
> Here is the sample code.
>
>>>> import rados
>>>> cluster = rados.Rados()
>>>> cluster.conf_read_file()
> failed to open log file '/var/log/ceph/client.admin.log': error 13: Permission denied
>>>> cluster.connect()
> 2011-11-03 11:49:20.937991 7f9fe5320720 monclient(hunting): MonClient::init(): Failed to create keyring
> 2011-11-03 11:49:50.938235 7f9fe5320720 monclient(hunting): authenticate timed out after 30
> 2011-11-03 11:49:50.938283 7f9fe5320720 librados: client.admin authentication error error 110: Connection timed out
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "/usr/lib/python2.7/rados.py", line 182, in connect
>     raise make_ex(ret, "error calling connect")
> rados.Error: error calling connect: error code 110
>
>
> -rw-------   1 root root    92 2011-11-02 18:13 client.admin.keyring
> -rw-------  1 root root     0 2011-11-03 07:47 client.admin.log
>
> regards,
>
> Eric/Pjack
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux