Hi, Greg, 

The log is generated by ceph service at runtime.

Even I change the permission, it would be overwritten by the service someday.

I am afraid if there is any other permission problem when I execute other 
commands.  

Ex: I need to modify more files' permission
Ex: The library use any API in kernel space.

Anyway, thanks for your reply, I will try to modify the two files' permission 
first.

regards,

Eric/Pjack

-----Original Message-----
From: Gregory Farnum [mailto:[email protected]] 
Sent: Thursday, November 03, 2011 12:49 PM
To: Eric YH Chen/WHQ/Wistron
Cc: [email protected]
Subject: Re: Cannot execute rados.py with sudoer

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,  <[email protected]> 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
>
>
>

Reply via email to