Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

External storage settings are missing in personal user settings for all ldap users #1251

Closed
pasbec opened this issue Sep 2, 2016 · 13 comments

Comments

@pasbec
Copy link

pasbec commented Sep 2, 2016

Steps to reproduce

1.1. Have owncloud 8.2.2 installed
1.2. Connected to AD via ldap
1.3. Activated app files_extrernal (4 for one user and 2 for another user)
1.4. Added external storages in Personal->External Storage
1.5. Conculsion: Everything works fine

2.1. Get Nextcloud server via git (stable9)
2.2. Dump owncloud my-sql database and clone it into nexcloud database
2.2. Copy config (keep 'oc_' prefix) and rename database to nextcloud
2.3. Upgrade (Finished succesfully)
2.4. Update server to stable10
2.5. Upgrade (Finished succesfully)

Expected behaviour

External storage settings are present in personal user settings

Actual behaviour

External storage settings are missing in personal user settings for all ldap users - despite of that all perviously configured storages are present in files and seem to work without problems. Furthermore the external storage settings ARE present for all local (non-ldap) users.

Server configuration

Operating system: Ubuntu 14.04 LTS

Web server: Apache/2.4.7 (Ubuntu) Server built: Jul 15 2016 15:34:04

Database: mysql 5.5.50-0ubuntu0.14.04.1-log (Ubuntu)

PHP version: php 5.5.9-1ubuntu4.19 (cli) (built: Jul 28 2016 19:31:33)

Nextcloud version: (see Nextcloud admin page) 10.0

Updated from an older Nextcloud/ownCloud or fresh install: ownCloud 8.2.2 -> Nextcloud/stable9 -> Nextcloud/stable10

Where did you install Nextcloud from: git branch stable10 (as of 01 Sep 2016)

Signing status:

Signing status

Integrity checker has been disabled. Integrity cannot be verified.

Installed applications:

App list

  - admin_audit: 1.0.0
  - calendar: 1.3.3
  - comments: 1.0.0
  - contacts: 1.3.1.0
  - dav: 1.0.0
  - federatedfilesharing: 1.0.1
  - federation: 1.0.1
  - files: 1.5.2
  - files_external: 1.0.2
  - files_sharing: 1.0.0
  - files_texteditor: 2.1
  - files_trashbin: 1.0.0
  - files_versions: 1.3.0
  - gallery: 15.0.0
  - mail: true
  - notes: 2.0.2
  - provisioning_api: 1.0.0
  - systemtags: 1.0.2
  - tasks: true
  - theming: 1.0.1
  - updatenotification: 1.0.1
  - user_ldap: 1.0.1
  - workflowengine: 1.0.1
Disabled:
  - encryption
  - testing

The content of config/config.php:

Config report

    "system": {
        "instanceid": "5196988a1ef11",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "\/net\/dc1\/Web\/Nextcloud",
        "dbtype": "mysql",
        "version": "9.1.0.16",
        "dbname": "nextcloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "loglevel": 3,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "log_authfailip": "true",
        "maxZipInputSize": 0,
        "allowZipDownload": true,
        "maintenance": false,
        "theme": "",
        "forcessl": true,
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "trashbin_retention_obligation": "7, auto",
        "mail_smtpmode": "smtp",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpsecure": "tls",
        "mail_smtptimeout": 30,
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "nextcloud",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory"
    }

Are you using external storage, if yes which one: Dropbox/WebDAV/Google Drive/Nextcloud

sudo -u www-data php occ files_external:list user 1

+----------+-------------------+---------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+
| Mount ID | Mount Point       | Storage | Authentication Type   | Configuration                                                                                                                | Options |
+----------+-------------------+---------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+
| 1        | /External/Dropbox | Dropbox | OAuth1                | configured: "true", app_key: "***", app_secret: "***", token: "***", token_secret: "***" |         |
| 2        | /External/Mailbox | WebDAV  | Username and password | host: "***", user: "***", password: "***", root: "***", secure: true        |         |
+----------+-------------------+---------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+

sudo -u www-data php occ files_external:list user 2

+----------+-------------------+--------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+
| Mount ID | Mount Point       | Storage      | Authentication Type   | Configuration                                                                                                                | Options |
+----------+-------------------+--------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+
| 3        | /External/Dropbox | Dropbox      | OAuth1                | configured: "true", app_key: "***", app_secret: "***", token: "***", token_secret: "***" |         |
| 4        | /External/Google  | Google Drive | OAuth2                | configured: "true", client_id: "***", client_secret: "***", token: "***"                                         |         |
| 5        | /External/Mailbox | WebDAV       | Username and password | host: "***", user: "***", password: "***", root: "***", secure: true         |         |
| 6        | /External/HZDR    | Nextcloud    | Username and password | host: "***", root: "", secure: true, user: "***", password: "***"                                          |         |
+----------+-------------------+--------------+-----------------------+------------------------------------------------------------------------------------------------------------------------------+---------+

for i in {1..6}; do echo storage id $i check; sudo -u www-data php occ files_external:verify $i; done

storage id 1 check
  - status: ok
  - code: 0
  - message
storage id 2 check
  - status: ok
  - code: 0
  - message
storage id 3 check
  - status: ok
  - code: 0
  - message
storage id 4 check
  - status: ok
  - code: 0
  - message
storage id 5 check
  - status: ok
  - code: 0
  - message
storage id 6 check
  - status: ok
  - code: 0
  - message

Are you using encryption: no

Are you using an external user-backend, if yes which one: ActiveDirectory

LDAP config

+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 | s01                                                                                                                                                                                                                |
+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                                                                                                  |
| hasPagedResultSupport         |                                                                                                                                                                                                                    |
| homeFolderNamingRule          |                                                                                                                                                                                                                    |
| lastJpegPhotoLookup           | 0                                                                                                                                                                                                                  |
| ldapAgentName                 | cn=nextcloud,cn=Users,dc=home,dc=***,dc=de                                                                                                                                                                  |
| ldapAgentPassword             | ***                                                                                                                                                                                                                |
| ldapAttributesForGroupSearch  |                                                                                                                                                                                                                    |
| ldapAttributesForUserSearch   |                                                                                                                                                                                                                    |
| ldapBackupHost                |                                                                                                                                                                                                                    |
| ldapBackupPort                |                                                                                                                                                                                                                    |
| ldapBase                      | cn=users,dc=home,dc=***,dc=de                                                                                                                                                                               |
| ldapBaseGroups                |                                                                                                                                                                                                                    |
| ldapBaseUsers                 |                                                                                                                                                                                                                    |
| ldapCacheTTL                  | 600                                                                                                                                                                                                                |
| ldapConfigurationActive       | 1                                                                                                                                                                                                                  |
| ldapDynamicGroupMemberURL     |                                                                                                                                                                                                                    |
| ldapEmailAttribute            |                                                                                                                                                                                                                    |
| ldapExperiencedAdmin          | 0                                                                                                                                                                                                                  |
| ldapExpertUUIDGroupAttr       |                                                                                                                                                                                                                    |
| ldapExpertUUIDUserAttr        |                                                                                                                                                                                                                    |
| ldapExpertUsernameAttr        |                                                                                                                                                                                                                    |
| ldapGroupDisplayName          | cn                                                                                                                                                                                                                 |
| ldapGroupFilter               | (&(|(objectclass=group))(|(cn=Nextcloud-Benutzer)(cn=Hauptbenutzer)(cn=Fremdbenutzer)(cn=Gastbenutzer)(cn=Familie)(cn=Basisbenutzer)))                                                                             |
| ldapGroupFilterGroups         | Nextcloud-Benutzer;Hauptbenutzer;Fremdbenutzer;Gastbenutzer;Familie;Basisbenutzer                                                                                                                                  |
| ldapGroupFilterMode           | 0                                                                                                                                                                                                                  |
| ldapGroupFilterObjectclass    | group                                                                                                                                                                                                              |
| ldapGroupMemberAssocAttr      | member                                                                                                                                                                                                             |
| ldapHost                      | dc1.home.***.de                                                                                                                                                                                             |
| ldapIgnoreNamingRules         |                                                                                                                                                                                                                    |
| ldapLoginFilter               | (&(&(|(objectclass=user))(|(|(memberof=CN=Nextcloud-Benutzer,CN=Users,DC=home,DC=***,DC=de)(primaryGroupID=1678))))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid))(|(sAMAccountName=%uid)))) |
| ldapLoginFilterAttributes     | sAMAccountName                                                                                                                                                                                                     |
| ldapLoginFilterEmail          | 1                                                                                                                                                                                                                  |
| ldapLoginFilterMode           | 0                                                                                                                                                                                                                  |
| ldapLoginFilterUsername       | 1                                                                                                                                                                                                                  |
| ldapNestedGroups              | 0                                                                                                                                                                                                                  |
| ldapOverrideMainServer        |                                                                                                                                                                                                                    |
| ldapPagingSize                | 500                                                                                                                                                                                                                |
| ldapPort                      | 389                                                                                                                                                                                                                |
| ldapQuotaAttribute            |                                                                                                                                                                                                                    |
| ldapQuotaDefault              |                                                                                                                                                                                                                    |
| ldapTLS                       | 0                                                                                                                                                                                                                  |
| ldapUserDisplayName           | displayName                                                                                                                                                                                                        |
| ldapUserDisplayName2          |                                                                                                                                                                                                                    |
| ldapUserFilter                | (&(|(objectclass=user))(|(|(memberof=CN=Nextcloud-Benutzer,CN=Users,DC=home,DC=***,DC=de)(primaryGroupID=1678))))                                                                                           |
| ldapUserFilterGroups          | Nextcloud-Benutzer                                                                                                                                                                                                 |
| ldapUserFilterMode            | 0                                                                                                                                                                                                                  |
| ldapUserFilterObjectclass     | user                                                                                                                                                                                                               |
| ldapUuidGroupAttribute        | auto                                                                                                                                                                                                               |
| ldapUuidUserAttribute         | auto                                                                                                                                                                                                               |
| turnOffCertCheck              | 0                                                                                                                                                                                                                  |
| useMemberOfToDetectMembership | 1                                                                                                                                                                                                                  |
+-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
### Client configuration

Browser:
Firefox 48.0.2
Internet Explorer 11.9
Opera 38

Operating system:
Ubuntu 14.04
Ubuntu 16.04
Windows Server 2012 R2
Windows 8.1
Windows 7
...

Logs

Web server error log

Web server error log

[***] [:error] [pid 7285] [client ***:54587] PHP Warning:  require_once(/var/www/nextcloud-git/lib/private/legacy/util.php): failed to open stream: No such file or directory in /var/www/nextcloud-git/lib/autoloader.php on line 184
[***] [:error] [pid 7285] [client ***:54587] PHP Fatal error:  require_once(): Failed opening required '/var/www/nextcloud-git/lib/private/legacy/util.php' (include_path='/var/www/nextcloud-git/3rdparty/pear/console_getopt:/var/www/nextcloud-git/3rdparty/pear/pear_exception:/var/www/nextcloud-git/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud-git/3rdparty/pear/archive_tar:/var/www/nextcloud-git/3rdparty/phpseclib/phpseclib/phpseclib:/var/www/nextcloud-git/lib/private:/var/www/nextcloud-git/config:/var/www/nextcloud-git/3rdparty:/var/www/nextcloud-git/apps:.:/usr/share/php:/usr/share/pear:/var/www/nextcloud-git') in /var/www/nextcloud-git/lib/autoloader.php on line 184
[***] [:error] [pid 7365] [client ***:54679] PHP Warning:  require_once(/var/www/nextcloud-git/lib/private/legacy/app.php): failed to open stream: No such file or directory in /var/www/nextcloud-git/lib/autoloader.php on line 184
[***] [:error] [pid 7365] [client ***:54679] PHP Fatal error:  require_once(): Failed opening required '/var/www/nextcloud-git/lib/private/legacy/app.php' (include_path='/var/www/nextcloud-git/3rdparty/pear/console_getopt:/var/www/nextcloud-git/3rdparty/pear/pear_exception:/var/www/nextcloud-git/3rdparty/pear/pear-core-minimal/src:/var/www/nextcloud-git/3rdparty/pear/archive_tar:/var/www/nextcloud-git/3rdparty/phpseclib/phpseclib/phpseclib:/var/www/nextcloud-git/lib/private:/var/www/nextcloud-git/config:/var/www/nextcloud-git/3rdparty:/var/www/nextcloud-git/apps:.:/usr/share/php:/usr/share/pear:/var/www/nextcloud-git') in /var/www/nextcloud-git/lib/autoloader.php on line 184
[***] [:error] [pid 12790] [client ***:49800] PHP Parse error:  imagescale(): one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully\n in /var/www/nextcloud-git/apps/theming/lib/Controller/ThemingController.php on line 211

#### Nextcloud log (data/nextcloud.log)

Nextcloud log

{"reqId":"+7YFeJqwmy9PoUrsY+xR","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"PROPFIND","url":"\/remote.php\/webdav","user":"***"}
{"reqId":"+7YFeJqwmy9PoUrsY+xR","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"PROPFIND","url":"\/remote.php\/webdav","user":"***"}
{"reqId":"34OcmITLRtkU0BuPn6v\/","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/cron.php","user":"***"}
{"reqId":"34OcmITLRtkU0BuPn6v\/","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/cron.php","user":"***"}
{"reqId":"og8JECuZDYkeHJiB7MWH","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","user":"***"}
{"reqId":"og8JECuZDYkeHJiB7MWH","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/index.php\/settings\/ajax\/checksetup","user":"***"}
{"reqId":"qMDDqbMsXJp+TyjwU0Pq","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/index.php\/heartbeat","user":"***"}
{"reqId":"qMDDqbMsXJp+TyjwU0Pq","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:46+00:00","method":"GET","url":"\/index.php\/heartbeat","user":"***"}
{"reqId":"hQFnJYe3urJFErFWPDFN","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Backup","user":"***"}
{"reqId":"hQFnJYe3urJFErFWPDFN","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Backup","user":"***"}
{"reqId":"+jQdTDfbkLOWEkIqYvoO","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Exchange","user":"***"}
{"reqId":"+jQdTDfbkLOWEkIqYvoO","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Exchange","user":"***"}
{"reqId":"WXxNEGmaBrYLSwgbS5l0","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Apps\/KeePass","user":"***"}
{"reqId":"WXxNEGmaBrYLSwgbS5l0","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Apps\/KeePass","user":"***"}
{"reqId":"t4m1jqPNnL9Li7t2ObvI","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Public","user":"***"}
{"reqId":"t4m1jqPNnL9Li7t2ObvI","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Public","user":"***"}
{"reqId":"B8UkC+QF+UBcVzMIAprZ","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Studies","user":"***"}
{"reqId":"B8UkC+QF+UBcVzMIAprZ","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Studies","user":"***"}
{"reqId":"yQtqZNUkaTfWrCug6wfF","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Work","user":"***"}
{"reqId":"yQtqZNUkaTfWrCug6wfF","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:54+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Work","user":"***"}
{"reqId":"bstQhJRBvCp76EscxGkq","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Apps","user":"***"}
{"reqId":"bstQhJRBvCp76EscxGkq","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Apps","user":"***"}
{"reqId":"4Of1xxC\/0ZoEXE\/cafx3","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Backup","user":"***"}
{"reqId":"4Of1xxC\/0ZoEXE\/cafx3","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Backup","user":"***"}
{"reqId":"rBnGSPdZkKVAx70iDBzI","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Exchange","user":"***"}
{"reqId":"rBnGSPdZkKVAx70iDBzI","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:55+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Exchange","user":"***"}
{"reqId":"+wSVPB8fsWRaL9fXDoff","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Family","user":"***"}
{"reqId":"+wSVPB8fsWRaL9fXDoff","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Family","user":"***"}
{"reqId":"P9oHS7grah7gf0rDabkw","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Private","user":"***"}
{"reqId":"P9oHS7grah7gf0rDabkw","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Private","user":"***"}
{"reqId":"BeA2wZZiyRJT+l0yiHbG","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Public","user":"***"}
{"reqId":"BeA2wZZiyRJT+l0yiHbG","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Public","user":"***"}
{"reqId":"59IgOtPzozK3t24LuURT","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Studies","user":"***"}
{"reqId":"59IgOtPzozK3t24LuURT","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Studies","user":"***"}
{"reqId":"wR5K8oENTnPeYG\/FEVQ+","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Work","user":"***"}
{"reqId":"wR5K8oENTnPeYG\/FEVQ+","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:56+00:00","method":"PROPFIND","url":"\/remote.php\/webdav\/Work","user":"***"}
{"reqId":"E4PoTtbYcXGaTpG73aeJ","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:58+00:00","method":"POST","url":"\/index.php\/settings\/***\/log\/level","user":"***"}
{"reqId":"E4PoTtbYcXGaTpG73aeJ","remoteAddr":"***","app":"user_ldap","message":"Base tree for Groups is empty, using Base DN","level":1,"time":"2016-09-02T19:16:58+00:00","method":"POST","url":"\/index.php\/settings\/***\/log\/level","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Unsupported marker type 0x02 at Unknown#0","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"imagecreatefromjpeg(): '\/net\/dc1\/Web\/Nextcloud\/***\/files\/Private\/Pictures\/***.jpg' is not a valid JPEG file at \/var\/www\/nextcloud-git\/lib\/private\/legacy\/image.php#516","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"filesize(): stat failed for \/net\/dc1\/Web\/Nextcloud\/***\/files\/var\/www\/nextcloud-git\/core\/img\/filetypes\/image.svg at \/var\/www\/nextcloud-git\/lib\/private\/Files\/Storage\/Local.php#198","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"fopen(\/net\/dc1\/Web\/Nextcloud\/***\/files\/var\/www\/nextcloud-git\/core\/img\/filetypes\/image.svg): failed to open stream: No such file or directory at \/var\/www\/nextcloud-git\/lib\/private\/Files\/Storage\/Local.php#203","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"fread() expects parameter 1 to be resource, boolean given at \/var\/www\/nextcloud-git\/lib\/private\/Files\/Storage\/Local.php#204","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"fclose() expects parameter 1 to be resource, boolean given at \/var\/www\/nextcloud-git\/lib\/private\/Files\/Storage\/Local.php#205","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
{"reqId":"CkbWtuayA788FES80QcQ","remoteAddr":"***","app":"PHP","message":"imagecreatefromstring(): Empty string or invalid image at \/var\/www\/nextcloud-git\/lib\/private\/legacy\/image.php#575","level":3,"time":"2016-09-02T20:53:07+00:00","method":"GET","url":"\/index.php\/core\/preview.png?file=***.jpg","user":"***"}
#### Browser log

Browser log

???
@pasbec
Copy link
Author

pasbec commented Sep 4, 2016

Hello everyone,

I could fence the problem down to one commit. But I'm sadly no PHP developer (only C++) and have no clue about any details, here.

The issue for me was introduced by @icewind1991 with commit 5dd20a5 (and c51e2eb).

The problem there is the new version of the registerSettings()

public function registerSettings() {
    $container = $this->getContainer();
    $backendService = $container->query('OCA\\Files_External\\Service\\BackendService');

    /** @var \OCA\Files_External\Service\UserGlobalStoragesService $userGlobalStoragesService */
    $userGlobalStoragesService = $container->query('OCA\Files_External\Service\UserGlobalStoragesService');
    if (count($userGlobalStoragesService->getStorages()) > 0 || $backendService->isUserMountingAllowed()) {
        \OCP\App::registerPersonal('files_external', 'personal');
    }
}

which for me works ONLY for non-ldap users. I sadly can't tell why.

The old (much simpler) version

public function registerSettings() {
    \OCP\App::registerPersonal('files_external', 'personal');
}

works fine for me with both local AND ldap-users.

I hope this is useful.

BTW: The latest download of Nextcloud 10.0.0 does still have the old version of registerSettings() and is thus working seemlessly, here.

Best regards,
Pascal

@pasbec
Copy link
Author

pasbec commented Sep 4, 2016

As addition: Now Nextcloud sometimes tells me that some external mountpoints could not be listed. But at least I can see all my personal mount points again and create new ones.

@pasbec
Copy link
Author

pasbec commented Sep 14, 2016

Is there really no one who can reproduce/comment this?

I could offer help for testing if necessary...

@nickvergessen
Copy link
Member

@icewind1991 ?

@jmccoy555
Copy link

Same issue on 10 for me. Installed from the download link on nextcloud.com

@pasbec
Copy link
Author

pasbec commented Oct 10, 2016

@jmccoy555: Did you download 10.0.0 or the latest 10.0.1?

As far as I remember from testing this issue some time ago, 10.0.0 was not affected.

The problem is that no one of the nextcloud-developers except @nickvergessen did respond to this post. And now they have it pushed into the official release. I would have expected a comment at least from @icewind1991...

@blizzz blizzz added the bug label Oct 11, 2016
@blizzz
Copy link
Member

blizzz commented Oct 11, 2016

Was also reported on discource and i could reproduce (on stable10, not on master).

@blizzz blizzz added this to the Nextcloud 10.0.2 milestone Oct 11, 2016
@blizzz
Copy link
Member

blizzz commented Oct 11, 2016

It has something to do with Session handling differences between Nc10 and master. As @pasbec says c51e2eb triggers the behaviour because we leave the method before we could register anything. While in master we are not logged in, yet, this works well. In stable10 things are different. It's a more fundamental issue.

A session restore via IUserSession::getUser happens. An uid is retrieved and the user manager is tasked to return the user object. In master this succeeds. On stable10 however, no user backend is registered yet at this point of time.

On master, the session is asked several times for the user, until the user_ldap app is loaded, finally the user backend is registered and everything is done. On stable10, however, it takes more cycles until the user_ldap app is loaded and before registering the backend, the files_externals app is loaded. I'll continue from this spot a bit later.

@blizzz
Copy link
Member

blizzz commented Oct 11, 2016

in stable10 it is because LDAP pulls in the Avatar Manager. And this - because it avatars are stored in the user directories, pulls in the filesystems app. Thus, user_ldap is not finished with the initialization while files_external is.

I thought on master it works because of the AppData changes, but no, this guess did not work out. Thing is, it's bad in general that user_ldap has strong requirement on the file system at this stage, we should postpone it a bit.

@blizzz blizzz self-assigned this Oct 11, 2016
blizzz added a commit that referenced this issue Oct 12, 2016
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
blizzz added a commit that referenced this issue Oct 12, 2016
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
blizzz added a commit that referenced this issue Oct 12, 2016
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
blizzz added a commit that referenced this issue Oct 12, 2016
[stable10] make AvatarManager use LazyRootFolder, fixes #1251
@blizzz
Copy link
Member

blizzz commented Oct 12, 2016

Fixed by #1723 being shipped with the next maintenance release.

@pasbec
Copy link
Author

pasbec commented Oct 17, 2016

Dear @blizzz,

thank you for fixing this so quickly. Really appreciate it!

I'm looking forward to testing it as soon as possible.

Best,
Pascal

@nickvergessen
Copy link
Member

@pasbec you can also change the two lines in your instance manually:
https://github.com/nextcloud/server/pull/1723/files

Shouldn't be too difficult

@pasbec
Copy link
Author

pasbec commented Oct 18, 2016

@nickvergessen was just a bit short on time. Simply pulled current stable10 (51300d3) and it works.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants