It's still a permissions issue, the user doesn't have the required privileges to execute the query.
This thread has some information that may prove useful: http://markmail.org/thread/q4zlh33qtpyllo76 I'd also recommend the Dev guide's chapter on security. -fs From: [email protected] [mailto:[email protected]] On Behalf Of Santhosh Raj Sent: Friday, March 27, 2009 11:32 AM To: General Mark Logic Developer Discussion Subject: RE: [MarkLogic Dev General] SEC_PRIV - Insufficient privilegeserror while running a simple xquery from cq by non-admin user - reg., Hi frank, Thanks I tried this from java also, from java we will connect to marklogic using xcc api right. For the uri i am passing the userid, password of the non-admin user. Eg: String connectionURI= "xcc://santhosh:santh...@localhost:9000/training" Session session = null; URI uri = new URI (connectionURI); ContentSource contentSource; contentSource = ContentSourceFactory.newContentSource(uri); session = contentSource.newSession(); Request request = session.newAdhocQuery("<hello>hello</hello>"); ResultSequence rs = session.submitRequest(request); System.out.println("test success :::::::: \n "+rs.asString()); Still it gives the same error. com.marklogic.xcc.exceptions.XQueryException: SEC-PRIV: Insufficient privileges at this line ResultSequence rs = session.submitRequest(request); Note: santhosh user is a non-admin user. Is there any thing like that in community version of Marklogic we can't achieve this? Santosh, The reason you're getting that error is because the use has insufficient privileges to execute CQ.(Off the top of my head I don't know exactly what permissions are required, but xdmp:eval will definitely be one of them.) If you were to place that same query within a module and access that module directly it should execute perfectly fine as that user. Provided that they have been granted read and execute permissions for the module. -fs From: [email protected] [ <mailto:[email protected]> mailto:[email protected]] On Behalf Of Santhosh Raj Sent: Friday, March 27, 2009 10:28 AM To: General Mark Logic Developer Discussion Subject: [MarkLogic Dev General] SEC_PRIV - Insufficient privileges error while running a simple xquery from cq by non-admin user - reg., Hi all. I am using community version of the marklogic server. I have created a user in the marklogic server and assigned all other roles except admin role. I have logged in to cq with that user credintials (note: this user does not have admin privilege.) and executed following xquery. XQuery: <welcome> Hi , Good Morning </welcome> It is not executing ., it is giving SEC_PRIV - Insufficient privileges error. Once i give admin role to him, then i can able to execute any xquery. What should i do? or what role or privilege should i assign to the user, so that he can execute any xquery. I want a non- admin user to execute any xquery. Thanks in advance. Santhosh Rajasekaran Tata Consultancy Services Mailto: [email protected] Website: <http://www.tcs.com/> http://www.tcs.com ____________________________________________ Experience certainty. IT Services Business Solutions Outsourcing ____________________________________________ =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you _______________________________________________ General mailing list [email protected] <http://xqzone.com/mailman/listinfo/general> http://xqzone.com/mailman/listinfo/general ForwardSourceID:NT0000A1C6 =====-----=====-----===== Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
