I get the following error when attempting to use cURL client on command line to upload a file to NextCloud.
** **<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">** ** <s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>** ** <s:message>No public access to this resource., Username or password was incorrect, No 'Authorization: Bearer' header found. Either the client didn't send one,or the server is mis-configured, Username or password was incorrect</s:message>** **</d:error>** **
While I have read other archived posts in the NextCloud forums regarding similar issues, it is unclear what solutions were found if any.
My command line call is as follows:
C:\somedata\> curl -X PUT --data-binary .\myfile.txt -u "user@mydomain.net:mypass1234wrd" "http://mynextcloudserver/nextcloud/remote.php/dav/files/user/purchase_orders/123path/myfile.txt"
NOTES:
The nextcloud instance is using LDAP for user logins.
The user ID and password work fine when logging into the nextcloud front end.
The message is telling you that the resource is not public, then username or password were not correct and that the server also tried to process a authorization token, but there was none.
Apparently, our code has issues when the username contains an @ character.
I have now tried this method. I get the same error.
Perhaps there is a server misconfiguration as it says.
I know the user id and pass work fine when logging into the web interface.
The web front end works fine for users.
What server config settings could be relevant?
<?xml version="1.0" encoding="utf-8"?>
<d:error xmlns:d="DAV:" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotAuthenticated</s:exception>
<s:message>No public access to this resource., Username or password was incorrect, No 'Authorization: Bearer' header found. Either the client didn't send one,
or the server is mis-configured, Username or password was incorrect</s:message>
</d:error>