[5.0.11RC1] New users can not log in after upgrade
Expected behavior Users can log into ownCloud
Actual behavior User cannot log in and data directory is never created
Steps to reproduce
- In this instance, ownCloud was upgraded from 5.0.10 to 5.0.11
- LDAP was configured and working in 5.0.10. Encryption was enabled in 5.0.10. LDAP Users were able to log in
- After the upgrade, LDAP users who had been logged in on 5.0.10 can log in
- Local users can log in
- 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.
- Encryption was disabled in 5.0.11 and users still cannot log in.
- 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…"
@blizzz Can you have a look please?
Thanks for testing. Could you provide the full owncloud.log? Or maybe a clean one for just one login attempt?
Hm, I see this behaviour with on a fresh install with local users (without LDAP enabled).
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
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.
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.
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.
maybe add unittests for issues like this?
i am not sure it will work so easily, it's cross-unit, but it would be ideal to have one, sure.
I did not have the app "Full Text Search" enabled.
Which apps do you have enabled?
And could you try the PR #4613 nevertheless?
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
Tested #4653 and it is working with that fix.
@ser72 could you please try this too with #4701 (and without #4653)? Thank You!
@blizzz : Tested with #4701 and it is working.
Thank you @ser72!
fixed with https://github.com/owncloud/core/pull/4701