server icon indicating copy to clipboard operation
server copied to clipboard

Shared link temp missing until next login

Open addaitrs opened this issue 7 years ago • 5 comments

Steps to reproduce

  1. Create (without expiry) or (with expiry far into the future) and then share a link
  2. Wait a period of time
  3. Link is un-available
  4. ONLY Log back in with the user who crated the link
  5. Link is now working!

Expected behaviour

The link shouldn't expire

Actual behaviour

The link is un-available

Server configuration

Operating system: Ubuntu 17.10

Web server: Apache2

Database: MySQL

PHP version: 7.1.17

Nextcloud version: (see Nextcloud admin page) 15.0.5

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

Where did you install Nextcloud from: https://download.nextcloud.com/server/releases/nextcloud-13.0.0.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 - accessibility: 1.1.0 - activity: 2.8.2 - cloud_federation_api: 0.1.0 - comments: 1.5.0 - dav: 1.8.1 - federatedfilesharing: 1.5.0 - federation: 1.5.0 - files: 1.10.0 - files_automatedtagging: 1.5.0 - files_external: 1.6.0 - files_pdfviewer: 1.4.0 - files_retention: 1.4.2 - files_sharing: 1.7.0 - files_texteditor: 2.7.0 - files_versions: 1.8.0 - files_videoplayer: 1.4.0 - firstrunwizard: 2.4.0 - gallery: 18.2.0 - logreader: 2.0.0 - lookup_server_connector: 1.3.0 - nextcloud_announcements: 1.4.0 - notifications: 2.3.0 - oauth2: 1.3.0 - ownbackup: 18.11.0 - password_policy: 1.5.0 - provisioning_api: 1.5.0 - serverinfo: 1.5.0 - sharerenamer: 2.5.1 - support: 1.0.0 - survey_client: 1.3.0 - systemtags: 1.5.0 - theming: 1.6.0 - twofactor_backupcodes: 1.4.1 - updatenotification: 1.5.0 - user_ldap: 1.5.0 - workflowengine: 1.5.0 ``` 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 ```

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

    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "htaccess.RewriteBase": "\/",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "15.0.5.3",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "mail_smtpmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "allow_user_to_change_display_name": true,
        "maintenance": false,
        "theme": "",
        "loglevel": 2,
        "updater.release.channel": "stable",
        "trashbin_retention_obligation": "7",
        "simpleSignUpLink.shown": false

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

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

Are you using encryption: yes/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) ...

addaitrs avatar Mar 28 '19 09:03 addaitrs

I'm encountering the exact same issue as mentioned in this issue. The problem is not specific to 15.0.5 and exists for 'a while' now.

LDAP-Backend with SMB storage (Log-in credentials, save in database). It also happens if the user's AD password definitely did not change.

Nextcloud 15.0.5.3 Debian 9.8 PHP 7.2.15 nginx 1.15.9 MariaDB 10.1.37

If this issue occurs, the share link still exists in oc_share. The row is untouched on re-login but starts working again after I navigate to the share target's parent item manually. No related errors in the log file so far.

Dr-Escher avatar Mar 29 '19 10:03 Dr-Escher

Ditto, I've checked the share link exists in oc_share and it does. It seems to be un-altered regardless of it working or not.

Also, I'm 99% certain that problem at least existed on the earliest public version 15, maybe 15.0.1?

FYI I'm using the ShareLink renamer application to convert the random share link into something human readable. This week I've updated this application, which promptly broke all of the links that were renamed. I've now set these back up and currently waiting to see if they will break again.

addaitrs avatar Mar 29 '19 11:03 addaitrs

I also got ShareLink Renamer installed but only used it once to rename one single share link which wasn't affected by this issue so far. I don't know if there is any correlation.

Dr-Escher avatar Mar 29 '19 11:03 Dr-Escher

cc @nextcloud/sharing

violoncelloCH avatar Apr 18 '19 23:04 violoncelloCH

Cannot reproduce in 18 after #15719 and the various other sharing api cleanups

skjnldsv avatar Oct 30 '19 20:10 skjnldsv