Hi guys,
yesterday I upgraded my Raspberry Pi 3 from Jessie to Stretch.
Since this time I have problems logging in with android client or desktop client (Linux) and get the 401 error (unauthorized). Web-Login works as expected.
I upgraded from nc13.0.0 to nc13.0.1 today, but it didnāt change anything.
I also deleted all bruteforce entries and authtokens.
How can I solve this issue? I already searched the web, but found nothing helpful.
I donāt have any suggestions, but Iām having what seems to be the same problem, also using Apache (2.4.19), mpm_event, and php-fpm (though php 7.2, not 7.0)āalthough Iām seeing it when running under FreeBSD 11.1. Nothing is written to nextcloud.log even when set at log level 1 (info), but when I set the log level to debug, I get this:
{"reqId":"xKofwVyOupn2Y5ypWNqA","level":0,"time":"2018-03-23T11:26:28-04:00","remoteAddr":"192.168.3.2","user":"--","app":"webdav","method":"PROPFIND","url":"\/remote.php\/webdav\/","message":"Exception:
{\"Exception\":\"Sabre\\\\DAV\\\\Exception\\\\NotAuthenticated\",\"Message\":\"No
'Authorization: Basic' header found. Either the client didn't send one,
or the server is misconfigured, No 'Authorization: Bearer' header found.
Either the client didn't send one, or the server is
mis-configured\",\"Code\":0,\"Trace\":\"#0 [internal function]:
Sabre\\\\DAV\\\\Auth\\\\Plugin->beforeMethod(Object(Sabre\\\\HTTP\\\\Request),
Object(Sabre\\\\HTTP\\\\Response))\\n#1
\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/3rdparty\\\/sabre\\\/event\\\/lib\\\/EventEmitterTrait.php(105):
call_user_func_array(Array, Array)\\n#2
\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(466):
Sabre\\\\Event\\\\EventEmitter->emit('beforeMethod', Array)\\n#3
\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Server.php(254):
Sabre\\\\DAV\\\\Server->invokeMethod(Object(Sabre\\\\HTTP\\\\Request),
Object(Sabre\\\\HTTP\\\\Response))\\n#4
\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/apps\\\/dav\\\/appinfo\\\/v1\\\/webdav.php(80):
Sabre\\\\DAV\\\\Server->exec()\\n#5
\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/remote.php(164):
require_once('\\\/usr\\\/local\\\/www\\\/...')\\n#6
{main}\",\"File\":\"\\\/usr\\\/local\\\/www\\\/apache24\\\/data\\\/nextcloud\\\/3rdparty\\\/sabre\\\/dav\\\/lib\\\/DAV\\\/Auth\\\/Plugin.php\",\"Line\":168}","userAgent":"Mozilla\/5.0
(Macintosh) mirall\/2.3.3 (build 84) (Nextcloud)","version":"13.0.1.1"}
The username and password entered are correct; if I enter an incorrect password, I get an authentication failure.
I also get this log message (but without your further lines):
**{āreqIdā:āYN3JCoOUYTXYid3IVeRjā,ālevelā:0,ātimeā:ā2018-03-23T15:42:27+00:00ā,āremoteAddrā:ā192.168.2.8ā,āuserā:āāā,āappā:āwebdavā,āmethodā:āPROPFINDā,āurlā:ā/remote.php/webdav/ā,āmessageā:āException: {"Exception":"Sabre\\DAV\\Exception\\NotAuthenticated","Message":"No āAuthorization: Basicā header found. Either the client didnāt send one, or the server is misconfigured, No āAuthorization: Bearerā header found. Either the client didnāt send one, or the server is mis-configured","Code":0,"Trace":"#0 [internal function]: Sabre\\DAV\\Auth\\Plugin->beforeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#1 \/var\/www\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php(105): call_user_func_array(Array, Array)\n#2 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(466): Sabre\\Event\\EventEmitter->emit(ābeforeMethodā, Array)\n#3 \/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php(254): Sabre\\DAV\\Server->invokeMethod(Object(Sabre\\HTTP\\Request), Object(Sabre\\HTTP\\Response))\n#4 \/var\/www\/nextcloud\/apps\/dav\/appinfo\/v1\/webdav.php(80): Sabre\\DAV\\Server->exec()\n#5 \/var\/www\/nextcloud\/remote.php(164): require_once(ā\/var\/www\/nextclā¦ā)\n#6 {main}","File":"\/var\/www\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Auth\/Plugin.php","Line":168}ā,āuserAgentā:āMozilla/5.0 (Linux) mirall/2.3.3 (Nextcloud)ā,āversionā:ā13.0.1.1ā}
**
Edit: I see that the manual calls for uncommenting the lines in the php-fpm config file (www.conf in my case) that set the environment variables. I hadnāt done that, but doing so (and restarting php-fpm) doesnāt seem to help things.
Edit 2: This post on the owncloud forums sure sounds like itās describing the same behavior.
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
to your virtual host configuration will fix the issue. And, indeed, I can log in using the desktop client if I add it. But lots of files arenāt syncing, and Iām having trouble figuring out why. Itās looking like progress thoughā¦
You made my night. Your RewriteCond and -Rule made it. I also enabled the module āheadersā, which was missing. donāt know if it is really needed, but sounds like it could.
I think Iām struggling with the same or similar issue for quite some time now. Iām runnig plesk on a ubuntu server 18.04 with apache2 only (no nginx). How do I find out which config file to edit and how can I prove I edited the right file/changes were successful?