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/>
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:
basexclient -U test -c "show users on test"
Password: Username Permission -------------------- test write
Hope this helps, Christian
On Tue, Jul 18, 2017 at 1:37 PM, Florian Wagner fl.wagner@uni-tuebingen.de wrote:
Hi everyone!
Trying out BaseX I'm having problems getting a very simple setup to work correctly.
list
Name Resources Size Input Path
test 2 33470 ~webdav 1 6004
2 database(s).
show users
Username Permission
admin admin test none
2 user(s).
show users on test
Username Permission
test write
1 user(s).
$ curl -u test -i -X PUT -T file.xml http://host:8080/basex/rest/test/file.xml Enter host password for user 'test': HTTP/1.1 100 Continue
HTTP/1.1 400 Bad Request Content-Type: text/plain;charset=utf-8 Content-Length: 24 Server: Jetty(9.3.9.v20160517)
write permission needed.
Using the "admin" user instead, works! Giving the test user global writer permissions makes it also work...
So what am I doing wrong here?
Regards Florian Wagner
Universitaetsbibliothek Tuebingen Wilhelmstr. 32, 72074 Tuebingen IT-Abteilung, Raum B109 +49(0)7071/29-77860 http://www.ub.uni-tuebingen.de