nextcloud / nextcloud/server

Shared by link not found randomly in smb external

Open
#29,804 14 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: external storage feature: ldap needs review
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

Steps to reproduce
  1. Share file or directory by link
  2. Open link in browser
  3. File not found
  4. Some time after link is working
  5. Give it more time. Not found
  6. Working
  7. Not found
  8. etc
Expected behaviour

working link

Actual behaviour

The document could not be found on the server. Maybe the share was deleted or has expired?

Server configuration

Operating system: FreeBSD 12.3

Web server: Apache24

Database: MariaDB

PHP version: 7.4 mod_php

Nextcloud version: 22.2.3

Updated from an older Nextcloud/ownCloud or fresh install: Update

Where did you install Nextcloud from: FreeBSD ports

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - bruteforcesettings: 2.2.0
  - calendar: 2.3.4
  - cloud_federation_api: 1.5.0
  - contacts: 4.0.6
  - dav: 1.19.0
  - external: 3.9.0
  - federatedfilesharing: 1.12.0
  - files: 1.17.0
  - files_external: 1.13.0
  - files_rightclick: 1.1.0
  - files_sharing: 1.14.0
  - files_videoplayer: 1.11.0
  - logreader: 2.7.0
  - lookup_server_connector: 1.10.0
  - mail: 1.10.5
  - notes: 4.2.0
  - oauth2: 1.10.0
  - passwords: 2021.11.20
  - photos: 1.4.0
  - provisioning_api: 1.12.0
  - settings: 1.4.0
  - spreed: 12.1.2
  - survey_client: 1.10.0
  - theming: 1.13.0
  - twofactor_backupcodes: 1.11.0
  - user_ldap: 1.12.1
  - viewer: 1.6.0
  - weather_status: 1.2.0
  - workflowengine: 2.4.0
Disabled:
  - accessibility
  - activity
  - admin_audit
  - circles
  - comments
  - contactsinteraction
  - dashboard
  - encryption
  - federation
  - files_pdfviewer
  - files_trashbin
  - files_versions
  - firstrunwizard
  - nextcloud_announcements
  - notifications
  - password_policy
  - privacy
  - rainloop
  - recommendations
  - serverinfo
  - sharebymail
  - support
  - systemtags
  - text
  - updatenotification
  - user_saml
  - user_status

Nextcloud configuration:

Config report
{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "example.com",
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "version": "22.2.3.0",
        "dbtype": "mysql",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "installed": true,
        "default_language": "en",
        "default_phone_region": "RU",
        "defaultapp": "files",
        "knowledgebaseenabled": true,
        "enable_avatars": true,
        "allow_user_to_change_display_name": true,
        "remember_login_cookie_lifetime": 1296000,
        "session_lifetime": 86400,
        "session_keepalive": true,
        "token_auth_enforced": false,
        "lost_password_link": "https:\/\/example.com\/ssp",
        "ldapIgnoreNamingRules": false,
        "maintenance": false,
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "PLAIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": false,
        "trashbin_retention_obligation": "auto",
        "versions_retention_obligation": "auto",
        "appcodechecker": true,
        "updatechecker": true,
        "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
        "updater.release.channel": "stable",
        "has_internet_connection": true,
        "config_is_read_only": false,
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "logdateformat": "F d, Y H:i:s",
        "logtimezone": "UTC",
        "log_query": false,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "dbindex": 0,
            "timeout": 1.5
        },
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "theme": "",
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "apps_paths": [
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": true
            },
            {
                "path": "\/usr\/local\/www\/nextcloud\/apps-pkg",
                "url": "\/apps-pkg",
                "writable": false
            }
        ],
        "overwrite.cli.url": "https:\/\/exaapmle.com",
        "overwriteprotocol": "https",
        "mysql.utf8mb4": true,
        "app_install_overwrite": [
            "rainloop",
            "bruteforcesettings"
        ]
    }
}

Are you using external storage, if yes which one: smb

Are you using encryption: no

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

LDAP configuration (delete this part if not used)
LDAP config
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Configuration                 |                                                                                                                                                                                           |
+-------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                                                                                                                                         |
| homeFolderNamingRule          |                                                                                                                                                                                           |
| lastJpegPhotoLookup           | 0                                                                                                                                                                                         |
| ldapAgentName                 | CN=Administrator,CN=Users,DC=example,DC=com                                                                                                                                                    |
| ldapAgentPassword             | ***                                                                                                                                                                                       |
| ldapAttributesForGroupSearch  |                                                                                                                                                                                           |
| ldapAttributesForUserSearch   |                                                                                                                                                                                           |
| ldapBackupHost                | dc.exaample.com                                                                                                                                                                               |
| ldapBackupPort                | 3269                                                                                                                                                                                      |
| ldapBase                      | CN=Users,DC=example,DC=com                                                                                                                                                                     |
| ldapBaseGroups                | CN=Users,DC=example,DC=com                                                                                                                                                                     |
| ldapBaseUsers                 | CN=Users,DC=example,DC=com                                                                                                                                                                     
| ldapCacheTTL                  | 6000                                                                                                                                                                                      
| ldapConfigurationActive       | 1                                                                                                                                                                                         
| ldapDefaultPPolicyDN          |                                                                                                                                                                                           
| ldapDynamicGroupMemberURL     |                                                                                                                                                                                           
| ldapEmailAttribute            | mail                                                                                                                                                                                      
| ldapExperiencedAdmin          | 0                                                                                                                                                                                         
| ldapExpertUUIDGroupAttr       |                                                                                                                                                                                           
| ldapExpertUUIDUserAttr        |                                                                                                                                                                                           
| ldapExpertUsernameAttr        | sAMAccountName                                                                                                                                                                            
| ldapExtStorageHomeAttribute   |                                                                                                                                                                                           
| ldapGidNumber                 | gidNumber                                                                                                                                                                                 
| ldapGroupDisplayName          | cn                                                                                                                                                                                        
| ldapGroupFilter               | (&(|(objectclass=group))(|(cn=Domain Admins)(cn=Domain Users)(cn=Shared)))                                                                                                                
| ldapGroupFilterGroups         | Domain Admins;Domain Users;Shared                                                                                                                                                         
| ldapGroupFilterMode           | 0                                                                                                                                                                                         
| ldapGroupFilterObjectclass    | group                                                                                                                                                                                     
| ldapGroupMemberAssocAttr      | member                                                                                                                                                                                   
| ldapHost                      | ldaps://dc.example.com                                                                                                                             
| ldapIgnoreNamingRules         |                                                                
| ldapLoginFilter               | (&(&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=top)(objectclass=user)))(|(samaccountname=%uid)(|(mailPrimaryAddress=%uid)(mail=%uid)(userPrincipalName=%uid)))) |
| ldapLoginFilterAttributes     |                                                                                                                                                                                           
| ldapLoginFilterEmail          | 1                                                                                                                                                                                         
| ldapLoginFilterMode           | 1                                                                                                                                                                                         
| ldapLoginFilterUsername       | 1                                                                                                                                                                                         
| ldapMatchingRuleInChainState  | unknown                                                                                                                                                                                   
| ldapNestedGroups              | 0                                                                                                                                                                                         
| ldapOverrideMainServer        |                                                                                                                                                                                           
| ldapPagingSize                | 500                                                                                                                                                                                       
| ldapPort                      | 3269                                                                                                                                                                                      
| ldapQuotaAttribute            |                                                                                                                                                                                           
| ldapQuotaDefault              |                                                                                                                                                                                           
| ldapTLS                       | 0                                                                                                                                                                                         
| ldapUserAvatarRule            | default                                                                                                                                                                                   
| ldapUserDisplayName           | displayname                                                                                                                                                                               
| ldapUserDisplayName2          |                                                                                                                                                                                           
| ldapUserFilter                | (&(|(objectclass=organizationalPerson)(objectclass=person)(objectclass=top)(objectclass=user)))                                                                                           
| ldapUserFilterGroups          | Domain Admins;Domain Users;Shared                                                                                                                                                         
| ldapUserFilterMode            | 0                                                                                                                                                                                         
| ldapUserFilterObjectclass     | organizationalPerson;person;top;user                                                                                                                                                      
| ldapUuidGroupAttribute        | auto                                                                                                                                                                                      
| ldapUuidUserAttribute         | auto                                                                                                                                                                                      
| turnOffCertCheck              | 1                                                                                                                                                                                         
| turnOnPasswordChange          | 0                                                                                                                                                                                         
| useMemberOfToDetectMembership | 1                                                                                                                                                                                         

Client configuration

Browser: any browser

Operating system: any

Logs
Web server error log
Web server error log
No relevant records
Nextcloud log (data/nextcloud.log)
Nextcloud log
No relevant records
Browser log
Browser log
No relevant records

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is identified. Start by reproducing the intermittent shared-link failure with an SMB external storage configured, then inspect the server logs and trace the shared-link lookup path. Done means links resolve consistently for the reported SMB setup and regression coverage demonstrates the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.