marklogic_coder
marklogic_coder

Reputation: 1510

Permission Denied Error While Loading Document in MarkLogic from filesystem

I have MarkLogic installed on Redhat and I am trying to Load XML Document in MarkLogic using following Query

xdmp:document-load("/root/abc/Set1/pqr.XML",
            <options xmlns="xdmp:document-load">
              <uri>/pqr</uri>
              <format>xml</format>
              <permissions>{xdmp:default-permissions()}</permissions>
             <collections>
              <collection>test1</collection>
              <collection>test2</collection>
              <collection>test3</collection>
              <collection>test4</collection>
            </collections>
            </options>)

While executing above query on qconsole i am getting following error,

[1.0-ml] SVC-FILOPN: xdmp:document-load("/root/abc/Set1/pqr.XML", pqrxml) -- File open error: open '/root/abc/Set1/pqr.XML': Permission denied

I am using root user for redhat, admin user for MarkLogic and file pqr.XML is also available in /root/abc/Set1 location.

Please guide me to resolve this error.

Upvotes: 1

Views: 630

Answers (1)

grtjn
grtjn

Reputation: 20414

The MarkLogic process runs as daemon user in RedHat. Make sure that user has read access to the file you try to load.

HTH!

Upvotes: 3

Related Questions