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

Problems with deleting directories and external storage #20329

Closed
szaimen opened this issue Apr 6, 2020 · 4 comments
Closed

Problems with deleting directories and external storage #20329

szaimen opened this issue Apr 6, 2020 · 4 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: external storage

Comments

@szaimen
Copy link
Contributor

szaimen commented Apr 6, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. mount two different network shares via /etc/fstab for the ncdata directory and external storage app, with correct permissions, etc. Copy all data from the current ncdata to the ncdata mount.
  2. mount a local external storage path to a user
  3. create a folder inside that external storage directory
  4. delete that folder

Expected behaviour

  1. move/copy that folder into the trashbin

Actual behaviour

  1. see two error messages in the nextcloud logs: (and the folder is deleted but not in the trashbin)
[PHP] Error: rename(): The first argument to copy() function cannot be a directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#290

DELETE /remote.php/dav/files/user/mount/folder

[PHP] Error: rename(//mnt/data/folder,//mnt/ncdata/user/files_trashbin/files/folder.d1586173198): Invalid cross-device link at /var/www/nextcloud/lib/private/Files/Storage/Local.php#290

DELETE /remote.php/dav/files/user/mount

Server configuration detail

Operating system: Linux 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64

Webserver: Apache (fpm-fcgi)

Database: pgsql PostgreSQL 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit

PHP version:

7.2.24-0ubuntu0.18.04.3
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, sodium, session, standard, cgi-fcgi, json, apcu, igbinary, PDO, xml, bz2, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, gmp, iconv, imap, intl, redis, ldap, exif, pdo_pgsql, pgsql, Phar, posix, readline, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 18.0.3 - 18.0.3.0

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: Unknown

Signing status

Array
(
)

List of activated apps
Enabled:
 - accessibility: 1.4.0
 - activity: 2.11.0
 - admin_audit: 1.8.0
 - announcementcenter: 3.7.0
 - apporder: 0.9.0
 - bookmarks: 2.3.4
 - bruteforcesettings: 1.6.0
 - calendar: 2.0.2
 - cloud_federation_api: 1.1.0
 - contacts: 3.2.0
 - cospend: 0.4.4
 - dav: 1.14.0
 - deck: 0.8.0
 - documentserver_community: 0.1.5
 - event_update_notification: 1.0.1
 - extract: 1.2.3
 - federatedfilesharing: 1.8.0
 - files: 1.13.1
 - files_external: 1.9.0
 - files_linkeditor: 1.0.13
 - files_mindmap: 0.0.20
 - files_pdfviewer: 1.7.0
 - files_rightclick: 0.15.2
 - files_sharing: 1.10.1
 - files_trashbin: 1.8.0
 - files_versions: 1.11.0
 - files_videoplayer: 1.7.0
 - forms: 1.1.1
 - impersonate: 1.5.0
 - issuetemplate: 0.6.0
 - logreader: 2.3.0
 - lookup_server_connector: 1.6.0
 - mail: 1.3.0
 - maps: 0.1.6
 - metadata: 0.11.1
 - music: 0.13.2
 - nextcloud_announcements: 1.7.0
 - notes: 3.2.0
 - notifications: 2.6.0
 - oauth2: 1.6.0
 - occweb: 0.0.7
 - ocr: 6.0.28
 - onlyoffice: 4.1.4
 - password_policy: 1.8.0
 - passwords: 2020.4.0
 - photos: 1.0.0
 - polls: 1.3.0
 - previewgenerator: 2.3.0
 - provisioning_api: 1.8.0
 - rainloop: 6.1.0
 - ransomware_detection: 0.7.0
 - ransomware_protection: 1.6.1
 - recommendations: 0.6.0
 - serverinfo: 1.8.0
 - settings: 1.0.0
 - spreed: 8.0.7
 - suspicious_login: 3.1.0
 - talk_simple_poll: 1.1.0
 - tasks: 0.12.1
 - text: 2.0.0
 - theming: 1.9.0
 - theming_customcss: 1.5.0
 - twofactor_nextcloud_notification: 2.3.0
 - updatenotification: 1.8.0
 - video_converter: 0.1.3
 - viewer: 1.2.0
 - workflowengine: 2.0.0
Disabled:
 - comments
 - encryption
 - federation
 - firstrunwizard
 - privacy
 - sharebymail
 - support
 - survey_client
 - systemtags
 - user_ldap

Configuration (config/config.php)
{
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "***REMOVED SENSITIVE VALUE***",
        "***REMOVED SENSITIVE VALUE***",
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "18.0.3.0",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "log_type": "file",
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "loglevel": "2",
    "mail_smtpmode": "smtp",
    "log_rotate_size": "10485760",
    "trashbin_retention_obligation": "auto, 180",
    "versions_retention_obligation": "auto, 365",
    "simpleSignUpLink.shown": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": true,
    "memcache.distributed": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 0,
        "timeout": 0.5,
        "dbindex": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "logtimezone": "Europe\/Berlin",
    "htaccess.RewriteBase": "\/",
    "maintenance": false,
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "share_folder": "\/Shared",
    "enable_previews": true,
    "preview_max_x": "2048",
    "preview_max_y": "2048",
    "jpeg_quality": "60",
    "enabledPreviewProviders": [
        "OC\\Preview\\PNG",
        "OC\\Preview\\JPEG",
        "OC\\Preview\\GIF",
        "OC\\Preview\\BMP",
        "OC\\Preview\\Movie",
        "OC\\Preview\\MP3"
    ],
    "theme": "",
    "updater.release.channel": "stable",
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [],
    "twofactor_enforced_excluded_groups": [
        "disabled_twofactorauth"
    ],
    "sharing.interal_shares_accepted": true
}

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

Are you using encryption: false

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

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.162 Safari/537.36 Edg/80.0.361.109

Operating system: is in the browser useragent

Logs

Web server error log
Insert your web server log here 
Nextcloud log
Insert your Nextcloud log here
Browser log

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

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

kesselb commented Apr 6, 2020

Search? I would search for Invalid cross-device link.

@szaimen
Copy link
Contributor Author

szaimen commented Apr 6, 2020

@kesselb do you mean #14743?

@kesselb
Copy link
Contributor

kesselb commented Apr 6, 2020

Yes

@szaimen
Copy link
Contributor Author

szaimen commented Apr 6, 2020

Thanks!

@szaimen szaimen closed this as completed Apr 6, 2020
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 feature: external storage
Projects
None yet
Development

No branches or pull requests

2 participants