Hi Florian,
Thanks for the added details. I managed to reproduce the behavior, and it should be fixed in the latest stable snapshot [1]. Could you give it a try?
Cheers, Christian
[1] http://files.basex.org/releases/latest/
On Tue, Jul 18, 2017 at 2:28 PM, Florian Wagner fl.wagner@uni-tuebingen.de wrote:
On Tue, 18 Jul 2017 13:53:09 +0200 Christian Grün christian.gruen@gmail.com wrote:
Hi Florian,
I’ve just tried to reproduce the behavior you’ve been describing. With my local instance, it works:
curl -u test "http://localhost:8984/rest/test/file.xml"
Enter host password for user 'test':
<file/>
I can download the file without problems if I upload it using WebDAV or the admin user first. It's just PUTing it there that doesn't work!
Did you possibly create the user in a separate BaseX instance? If you have started the BaseX server, and if you have created the user via a single local BaseX instance, the settings might not have been adopted by a BaseX HTTP server instance. You can e.g. verify this by using the basexclient:
I'm running BaseX in Jetty and have added the users and permissions using the DBA. On startup it clearly logs where it get's its data from:
+> Initparams o.e.j.w.WebAppContext@1a968a59{/basex,file:///tmp/jetty-0.0.0.0-8080-BaseX864.war-_basex-any-5617794070525242464.dir/webapp/,AVAILABLE}{/BaseX.war} +- org.basex.repopath=/var/db/basex/repo +- org.basex.dbpath=/var/db/basex/data +- org.basex.restpath=/var/db/basex/rest
And /var/db/basex/data/users.xml contains my user.
...
<user name="test" permission="none"> <password algorithm="digest"> <hash>...</hash> </password> <password algorithm="salted-sha256"> <salt>...</salt> <hash>...</hash> </password> <database pattern="test" permission="write"/> </user> ...
Also there's another indication that this is the correct instance. I've changed the password of the admin user. If I upload with "curl -u admin ..." I have to enter the new one or it won't work.
And one more: If I do "curl -u digi3f:WRONGPW ..." I get "Access denied" instead of "write permission needed".
Any other ideas?
Regards Florian Wagner
Universitaetsbibliothek Tuebingen Wilhelmstr. 32, 72074 Tuebingen IT-Abteilung, Raum B109 +49(0)7071/29-77860 http://www.ub.uni-tuebingen.de