LDAP users not able to log in. Directory missing

Hi!
We have a fresh NC 12.0.0 installation on Ubuntu 16.04, and have just started to explore. One requirement we have is that the users will be stored in openLDAP. After some fiddling, we managed to get it working, but with one exception:

After the LDAP app has been configured, users show up as expected on the users page, but they cant log in. After some digging and looking at the logs, I found that on the first login, the home directory (and the “cache” directory) is created in the configured datadirectory, but the “files” directory is missing. This leads to an Internal Server Error when the user tries to log in and the following log entry:

{"reqId":"Vrv88AXt6UKwBzb4Lm5k","level":3,"time":"2017-06-22T08:30:30+00:00","remoteAddr":"<removed ip>","user":"<removed user name>","app":"index","method":"GET","url":"\/index.php\/apps\/files\/","message":"Exception: {\"Exception\":\"OCP\\\\Files\\\\NotFoundException\",\"Message
\":\"\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files\\\/lib\\\/Controller\\\/ViewController.php(130): OC_Helper::getStorageInfo('\\\/', false)\\n#1 \\\/var\\\/www\\\/nextcloud\\\/apps\\\/files\\\/lib\\\/Controller\\\/ViewController.php(159): OC
A\\\\Files\\\\Controller\\\\ViewController->getStorageInfo()\\n#2 [internal function]: OCA\\\\Files\\\\Controller\\\\ViewController->index('', '', NULL, false)\\n#3 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(160): call_user_f
unc_array(Array, Array)\\n#4 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Http\\\/Dispatcher.php(90): OC\\\\AppFramework\\\\Http\\\\Dispatcher->executeController(Object(OCA\\\\Files\\\\Controller\\\\ViewController), 'index')\\n#5 \\\/var\\\/www\\\/ne
xtcloud\\\/lib\\\/private\\\/AppFramework\\\/App.php(114): OC\\\\AppFramework\\\\Http\\\\Dispatcher->dispatch(Object(OCA\\\\Files\\\\Controller\\\\ViewController), 'index')\\n#6 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/AppFramework\\\/Routing\\\/RouteActionHandl
er.php(47): OC\\\\AppFramework\\\\App::main('ViewController', 'index', Object(OC\\\\AppFramework\\\\DependencyInjection\\\\DIContainer), Array)\\n#7 [internal function]: OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler->__invoke(Array)\\n#8 \\\/var\\\/www\\\/nextclou
d\\\/lib\\\/private\\\/Route\\\/Router.php(299): call_user_func(Object(OC\\\\AppFramework\\\\Routing\\\\RouteActionHandler), Array)\\n#9 \\\/var\\\/www\\\/nextcloud\\\/lib\\\/base.php(1000): OC\\\\Route\\\\Router->match('\\\/apps\\\/files\\\/')\\n#10 \\\/var\\\/www\\\/n
extcloud\\\/index.php(40): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/nextcloud\\\/lib\\\/private\\\/legacy\\\/helper.php\",\"Line\":543}","userAgent":"Mozilla\/5.0 (Macintosh; Intel Mac OS X 10.12; rv:53.0) Gecko\/20100101 Firefox\/53.0","version":
"12.0.0.29"}

If I create the “files” directory it all works as expected.
I double checked the behaviour by creating a local user through the GUI, and that worked as expected, the directories were created and the user could log in.

I saw an old ticket regarding something similar (can’t find it now, though), but that problem appeared to be resolved

Any help would be appreciated.

Many thanks
Bjørn

1 Like

Hei Bjørn

I’ve the same problem. The “files” directory is missing at first logon with ldap user.

Have you found a solution?

Greeting
Jon

Hi Jon,

No I haven’t found a solution. The workaround (which works ok for us as we are just exploring nextcloud to see if it’s for us at the moment), is to create the user directory including the files directory (a copy from the skeleton dir) in advance. If they are in place, the LDAP user can log in. It won’t really work in a big environment, though - so I hope someone will be able to solve it at some stage.

Cheers,
Bjørn

No solution to this yet?? I have the same problem… :frowning: