Fellow basex users,
Test case: (as 'admin' user:) run file1.xq, containing:
let $test := basex:read('/tmp/222.readme') return <test>{$test}</test>
Returns, as expected: <test>readme from basex </test>
But when run as any other user WITHOUT admin privilige (from the log):
RUN /tmp/222 Error: ADMIN permission needed. 7.75 ms
Behaviour is the same if the file is copied to be inside the basex home directory e.g. basex:read('222.readme').
I would like to be able to read files in basex queries as a non-admin user. But perhaps the admin restriction on this behaviour is by design?
Cheers,
Sandra
Dear Sandra,
you need to have Admin permission, cause the query accesses files on the server and that should only be possible for admins. You can change that by replacing the following: line 149 in Fun.java: if(!ctx.context.user.perm(User.ADMIN)) to: if(!ctx.context.user.perm(User.READ))
I hope this helps, cheers Andreas
Sandra Maria Silcot schrieb:
Fellow basex users,
Test case: (as 'admin' user:) run file1.xq, containing:
let $test := basex:read('/tmp/222.readme') return <test>{$test}</test>
Returns, as expected: <test>readme from basex
</test>
But when run as any other user WITHOUT admin privilige (from the log):
RUN /tmp/222 Error: ADMIN permission needed. 7.75 ms
Behaviour is the same if the file is copied to be inside the basex home directory e.g. basex:read('222.readme').
I would like to be able to read files in basex queries as a non-admin user. But perhaps the admin restriction on this behaviour is by design?
Cheers,
Sandra
BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
basex-talk@mailman.uni-konstanz.de