core icon indicating copy to clipboard operation
core copied to clipboard

[5.0.11RC1] New users can not log in after upgrade

Open ser72 opened this issue 13 years ago • 18 comments

Expected behavior Users can log into ownCloud

Actual behavior User cannot log in and data directory is never created

Steps to reproduce

  1. In this instance, ownCloud was upgraded from 5.0.10 to 5.0.11
  2. LDAP was configured and working in 5.0.10. Encryption was enabled in 5.0.10. LDAP Users were able to log in
  3. After the upgrade, LDAP users who had been logged in on 5.0.10 can log in
  4. Local users can log in
  5. LDAP users who had never logged in cannot log in. The browser spins constantly forever. Never spits out any error. The Data directory is never created for these users.
  6. Encryption was disabled in 5.0.11 and users still cannot log in.
  7. After closing the browser, the logs continue to fill up with the following repeating continuously until apache was restarted

{"app":"PHP","message":"filemtime(): stat failed for /mnt/serlab/D5D3BDC6-B988-4DDE-B9F4-7F17B0BA8BA6/cache/ at /var/www/owncloud/lib/files/storage/local.php#92","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"filemtime(): stat failed for /mnt/serlab/61B915A9-6EEB-47A0-ACB2-0ADD98EFAF15/cache/ at /var/www/owncloud/lib/files/storage/local.php#92","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at /var/www/owncloud/lib/cache/file.php#97","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"filemtime(): stat failed for /mnt/serlab/D5D3BDC6-B988-4DDE-B9F4-7F17B0BA8BA6/cache/ at /var/www/owncloud/lib/files/storage/local.php#92","level":2,"time":"2013-08-28T13:27:30+00:00"} {"app":"PHP","message":"filemtime(): stat failed for /mnt/serlab/D5D3BDC6-B988-4DDE-B9F4-7F17B0BA8BA6/cache/ at /var/www/owncloud/lib/files/storage/local.php#92","level":2,"time":"2013-08-28T13:27:30+00:00"}

Server configuration {"installed":"true","version":"5.0.15","versionstring":"5.0.11RC1"} Ubuntu apache

Client configuration browser: IE9, IE 10, Chrome

EDIT Blizzz: Changed the title from "LDAP Users…" to "New Users…"

ser72 avatar Aug 28 '13 13:08 ser72

@blizzz Can you have a look please?

karlitschek avatar Aug 28 '13 13:08 karlitschek

Thanks for testing. Could you provide the full owncloud.log? Or maybe a clean one for just one login attempt?

blizzz avatar Aug 29 '13 09:08 blizzz

Hm, I see this behaviour with on a fresh install with local users (without LDAP enabled).

blizzz avatar Aug 29 '13 11:08 blizzz

It works with the admin user, but not with a new local user. My owncloud.log is below. Could be related to filecache? cc @icewind1991

{"app":"PHP","message":"opendir(\/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/): failed to open dir: No such file or directory at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#40","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"filemtime(): stat failed for \/home\/blizzz\/owncloud\/dev\/oc5011r1\/data\/klein\/cache\/ at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/files\/storage\/local.php#92","level":2,"time":"2013-08-29T11:14:54+00:00"}
{"app":"PHP","message":"readdir() expects parameter 1 to be resource, boolean given at \/home\/blizzz\/owncloud\/dev\/oc5011r1\/lib\/cache\/file.php#97","level":2,"time":"2013-08-29T11:14:54+00:00"}

P.S.: the log repeats in an infinite loop

blizzz avatar Aug 29 '13 11:08 blizzz

Seems to happen when there is no data folder for the user in place. With regard to LDAP it smells like it is triggered before initMountPoints is done.

blizzz avatar Aug 29 '13 11:08 blizzz

Yes, that is my experience. If there is a data folder, users can log in. If there is no data folder, users can not log in and the data folder is not created.

ser72 avatar Aug 29 '13 12:08 ser72

Do you have the app "Full Text Search" enabled? It triggers setupFS to run before login and thus won't do afterwards. But there is where the folder is created. The app however is not to blame, might be a pitfall for any.

blizzz avatar Aug 29 '13 21:08 blizzz

maybe add unittests for issues like this?

kiranos avatar Aug 30 '13 06:08 kiranos

i am not sure it will work so easily, it's cross-unit, but it would be ideal to have one, sure.

blizzz avatar Aug 30 '13 10:08 blizzz

I did not have the app "Full Text Search" enabled.

ser72 avatar Aug 30 '13 11:08 ser72

Which apps do you have enabled?

blizzz avatar Aug 30 '13 11:08 blizzz

And could you try the PR #4613 nevertheless?

blizzz avatar Aug 30 '13 11:08 blizzz

Apps enabled:

Encryption <-- Tried with and without this app enabled External Storage Support First Run Wizard Image Viewer LDAP Home Connector <-- Tried with and without this app enabled LDAP user and group Backend Log Audit Info Shared Files Text Editor User Account Migration Versoins ownCloud Instance Migration

ser72 avatar Aug 30 '13 11:08 ser72

Tested #4653 and it is working with that fix.

ser72 avatar Aug 30 '13 16:08 ser72

@ser72 could you please try this too with #4701 (and without #4653)? Thank You!

blizzz avatar Sep 02 '13 17:09 blizzz

@blizzz : Tested with #4701 and it is working.

ser72 avatar Sep 03 '13 12:09 ser72

Thank you @ser72!

blizzz avatar Sep 04 '13 09:09 blizzz

fixed with https://github.com/owncloud/core/pull/4701

blizzz avatar Sep 04 '13 10:09 blizzz