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

Cannot execute occ files:scan on users authenticated on LDAP #26505

Closed
jasysadmin opened this issue Apr 11, 2021 · 1 comment
Closed

Cannot execute occ files:scan on users authenticated on LDAP #26505

jasysadmin opened this issue Apr 11, 2021 · 1 comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@jasysadmin
Copy link

Steps to reproduce

  1. Run occ files:scan --path=

Expected behaviour

Should rescan files on disc

Actual behaviour

Error:
[apache@cloud-master-01 nextcloud]$ php occ files:scan --path=
Starting scan for user 1 out of 1 ()
Exception during scan: ldap_search(): Search: No such object
#0 /var/www/nextcloud/apps/user_ldap/lib/LDAP.php(230): OCA\Files\Command\Scan->exceptionErrorHandler()
#1 [internal function]: OCA\User_LDAP\LDAP->OCA\User_LDAP{closure}()
#2 [internal function]: ldap_search()
#3 /var/www/nextcloud/apps/user_ldap/lib/LDAP.php(342): call_user_func_array()
#4 /var/www/nextcloud/apps/user_ldap/lib/LDAP.php(235): OCA\User_LDAP\LDAP->invokeLDAPMethod()
#5 [internal function]: OCA\User_LDAP\LDAP->search()
#6 /var/www/nextcloud/apps/user_ldap/lib/Access.php(1091): call_user_func_array()
#7 /var/www/nextcloud/apps/user_ldap/lib/Access.php(1095): OCA\User_LDAP\Access->OCA\User_LDAP{closure}()
#8 /var/www/nextcloud/apps/user_ldap/lib/Access.php(1148): OCA\User_LDAP\Access->invokeLDAPMethod()
#9 /var/www/nextcloud/apps/user_ldap/lib/Access.php(1320): OCA\User_LDAP\Access->executeSearch()
#10 /var/www/nextcloud/apps/user_ldap/lib/Access.php(1025): OCA\User_LDAP\Access->search()
#11 /var/www/nextcloud/apps/user_ldap/lib/Access.php(938): OCA\User_LDAP\Access->searchGroups()
#12 /var/www/nextcloud/apps/user_ldap/lib/Group_LDAP.php(709): OCA\User_LDAP\Access->fetchListOfGroups()
#13 /var/www/nextcloud/apps/user_ldap/lib/Group_Proxy.php(135): OCA\User_LDAP\Group_LDAP->getUserGroups()
#14 /var/www/nextcloud/lib/private/Group/Manager.php(338): OCA\User_LDAP\Group_Proxy->getUserGroups()
#15 /var/www/nextcloud/lib/private/Group/Manager.php(327): OC\Group\Manager->getUserIdGroupIds()
#16 /var/www/nextcloud/apps/groupfolders/lib/Folder/FolderManager.php(524): OC\Group\Manager->getUserGroupIds()
#17 /var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php(80): OCA\GroupFolders\Folder\FolderManager->getFoldersForUser()
#18 /var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php(84): OCA\GroupFolders\Mount\MountProvider->getFoldersForUser()
#19 /var/www/nextcloud/lib/private/Files/Config/MountProviderCollection.php(109): OCA\GroupFolders\Mount\MountProvider->getMountsForUser()
#20 /var/www/nextcloud/lib/private/Files/Filesystem.php(452): OC\Files\Config\MountProviderCollection->addMountForUser()
#21 /var/www/nextcloud/lib/private/Files/Filesystem.php(377): OC\Files\Filesystem::initMountPoints()
#22 /var/www/nextcloud/lib/private/legacy/OC_Util.php(324): OC\Files\Filesystem::init()
#23 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(116): OC_Util::setupFS()
#24 /var/www/nextcloud/lib/private/Files/Utils/Scanner.php(202): OC\Files\Utils\Scanner->getMounts()
#25 /var/www/nextcloud/apps/files/lib/Command/Scan.php(158): OC\Files\Utils\Scanner->scan()
#26 /var/www/nextcloud/apps/files/lib/Command/Scan.php(214): OCA\Files\Command\Scan->scanFiles()
#27 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OCA\Files\Command\Scan->execute()
#28 /var/www/nextcloud/core/Command/Base.php(169): Symfony\Component\Console\Command\Command->run()
#29 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1009): OC\Core\Command\Base->run()
#30 /var/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#31 /var/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#32 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#33 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#34 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#35 {main}

Server configuration

Operating system:
CentOS 8
Web server:
Apache/2.4.37 (centos)

Database:
mysql Ver 8.0.21-12 for Linux on x86_64 (Percona Server (GPL), Release 12, Revision 7ddfdfe)

PHP version:
PHP 7.4.16 (cli) (built: Mar 2 2021 10:35:17) ( NTS )

Nextcloud version: (see Nextcloud admin page)
21.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 20 (did not work on 20 also, problem is PHP 7.4

Where did you install Nextcloud from:
https://download.nextcloud.com/server/releases/nextcloud-21.0.1.zip

Signing status:

Signing status
Login as admin user into your Nextcloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

No errors have been found.

List of activated apps:

App list
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your Nextcloud installation folder

Enabled:

  • accessibility: 1.7.0
  • activity: 2.14.3
  • admin_audit: 1.11.0
  • bbb: 1.3.0
  • bruteforcesettings: 2.1.0
  • cloud_federation_api: 1.4.0
  • cms_pico: 1.0.15
  • comments: 1.11.0
  • contactsinteraction: 1.2.0
  • dav: 1.17.1
  • deck: 1.3.2
  • documentserver_community: 0.1.9
  • drawio: 1.0.0
  • external: 3.8.1
  • federatedfilesharing: 1.11.0
  • federation: 1.11.0
  • files: 1.16.0
  • files_accesscontrol: 1.11.0
  • files_automatedtagging: 1.11.0
  • files_downloadactivity: 1.10.0
  • files_external: 1.12.0
  • files_markdown: 2.3.3
  • files_mindmap: 0.0.24
  • files_pdfviewer: 2.1.0
  • files_retention: 1.10.0
  • files_rightclick: 1.0.0
  • files_sharing: 1.13.1
  • files_texteditor: 2.14.0
  • files_trashbin: 1.11.0
  • files_versions: 1.14.0
  • files_videoplayer: 1.10.0
  • firstrunwizard: 2.10.0
  • groupfolders: 9.0.0
  • impersonate: 1.8.0
  • logreader: 2.6.0
  • lookup_server_connector: 1.9.0
  • maps: 0.1.8
  • nextcloud_announcements: 1.10.0
  • notifications: 2.9.0
  • oauth2: 1.9.0
  • onlyoffice: 6.3.0
  • password_policy: 1.11.0
  • photos: 1.3.0
  • privacy: 1.5.0
  • provisioning_api: 1.11.0
  • quota_warning: 1.10.0
  • recommendations: 1.0.0
  • sendent: 1.0.22
  • serverinfo: 1.11.0
  • settings: 1.3.0
  • sharebymail: 1.11.0
  • support: 1.4.0
  • survey_client: 1.9.0
  • systemtags: 1.11.0
  • text: 3.2.0
  • theming: 1.12.0
  • twofactor_backupcodes: 1.10.0
  • updatenotification: 1.11.0
  • user_ldap: 1.11.0
  • user_status: 1.1.1
  • viewer: 1.5.0
  • weather_status: 1.1.0
  • workflowengine: 2.3.0
  • zimbradrive: 0.8.25
    Disabled:
  • dashboard
  • encryption
  • socialsharing_email

Nextcloud configuration:

Config report
If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your Nextcloud installation folder

or 

Insert your config.php content here. 
Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …)

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"cloud-01.example.com",
"nimbus.example.com",
"cloud.example.com"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"versions_retention_obligation": "30, auto",
"dbtype": "mysql",
"version": "21.0.1.1",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"logfile": "/var/log/nextcloud/nextcloud.log",
"log_rotate_size": 10485760,
"installed": true,
"ldapUserCleanupInterval": "120",
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "REMOVED SENSITIVE VALUE",
"port": 6379
},
"mail_smtpmode": "smtp",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "25",
"default_language": "pt_PT",
"maintenance": false,
"debug": false,
"loglevel": 2,
"default_phone_region": "PT",
"preview_libreoffice_path": "/usr/lib64/libreoffice/program/soffice.bin",
"customclient_desktop": "https://cloud.example.com/downloads/Nextcloud-setup.exe",
"updater.release.channel": "stable",
"overwrite.cli.url": "https://cloud.example.com",
"overwriteprotocol": "https",
"mysql.utf8mb4": true,
"app_install_overwrite": [
"files_retention",
"zimbradrive",
"joplin"
],
"theme": ""
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
/nextcloud/data

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
LDAP

LDAP configuration (delete this part if not used)

LDAP config
With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your Nextcloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Web server error log

Web server error log
Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

Browser log

Browser log
Insert your browser log here, this could for example include:

a) The javascript console log
b) The network log
c) ...
@jasysadmin jasysadmin added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Apr 11, 2021
@szaimen
Copy link
Contributor

szaimen commented Jul 2, 2021

Thank you for taking the time to report a bug! 👍

As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com
If you wish support with setup issues from Nextcloud GmbH we offer this as part of the Nextcloud subscription. Learn more about this at https://nextcloud.com/enterprise/

@szaimen szaimen closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

2 participants