Hi,

I am trying to list out all users using the Ceph S3 api and php. These are
the lines of code which i used for



--------------------------------------------------------------------------------------------------






$url = 
"http://XXXX.Xlinux.com/admin/user?format=json<http://gateway.3linux.com/admin/user?format=json>
";

$ch = curl_init ($url);

curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET"); curl_setopt($ch,
CURLOPT_USERPWD,
"P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/");

curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: AWS
P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/"));

curl_setopt($ch, CURLOPT_HEADER, 0);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch,
CURLOPT_BINARYTRANSFER,1); $response = curl_exec($ch); $output =
json_encode($response);



    print_r($output);



--------------------------------------------------------------------------------------------------






I am getting an error: access denied as output. Could you please check it ?



I have also tried the same using the curl command like



curl -i 'http://XXX.Xlinux.com/admin/usage?format=json' -X GET -H

'Authorization: AWS

P8K3750Z3PP5MGUKQYBL:CB+Ioydr1XsmQF\/gQmE\/X3YsDjtDbxLZzByaU9t\/' -H

'Host: XXX.Xlinux.com' -H 'Content-Length: 0'



HTTP/1.1 403 Forbidden

Date: Fri, 11 Apr 2014 10:08:20 GMT

Server: Apache/2.2.22 (Ubuntu)

Accept-Ranges: bytes

Content-Length: 23

Content-Type: application/json



{"Code":"AccessDenied"}


Can any body let me know if anything wrong in the above... ??
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to