owncloud / owncloud/core

Deleting files on SMB with read-only rights does not notify that delete is not possible

Open
#37,235 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Type:Bug
Dominant language
PHP
Stars
8.8k
Forks
2.1k
Avg merge
20h 7m
Merged PRs (30d)
41

Description

Steps to reproduce
  1. Having an SMB mount with a folder containing big files. eg +2GB (video camera files)
  2. Backend share is set to read-only for the user used
  3. Try to delete a big file
Expected behaviour

Notification about delete is not possible.

Actual behaviour

The spinner turns, but nothing gets deleted, even waiting for a long time.

Note I:

There is read SMB traffic I can monitor on the backend, but I cant identify a location if/where it gets written to the local server.

Note II:

After looking around, I identified the problem. The SMB share (which I setup long time ago) is set to read-only on the backend for the used user (it is not a readonly mount!). It would be good to get a notification if the delete action has been triggered but is not possible instead of trying forever.

Note III:

There are NO log entries related to this action, not in nginx or ownCloud.

Server configuration

Operating system: Ubuntu 18.04

Web server: nginx

Database: MariaDB

PHP version: 7.3

ownCloud version: (10.4)

Updated from an older ownCloud or fresh install: updated

Where did you install ownCloud from: tar

Signing status (ownCloud 9.0 and above):
all green

The content of config/config.php:

{
    "system": {
        "instanceid": "ocbdscdhwdo8",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "xxxx"
        ],
        "datadirectory": "xxxx\/data",
        "overwrite.cli.url": "https:\/\/xxxx",
        "dbtype": "mysql",
        "version": "10.4.0.4",
        "dbname": "xxxx",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "filelocking.enabled": "true",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "\/var\/run\/redis\/redis-server.sock",
            "port": 0,
            "timeout": 0,
            "dbindex": 0
        },
        "filesystem_check_changes": 1,
        "excluded_directories": [
            ".snapshot",
            "~snapshot"
        ],
        "upgrade.automatic-app-update": true,
        "quota_include_external_storage": false,
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpauthtype": "LOGIN",
        "apps_paths": [
            {
                "path": "xxxx\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "xxxx\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "maintenance": false,
        "loglevel": 2,
        "theme": "",
        "show_server_hostname": false,
        "log_rotate_size": "20971520"
    }
}

List of activated apps:

Enabled:
  - activity: 2.5.3
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.5.0
  - federatedfilesharing: 0.5.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_clipboard: 1.0.2
  - files_external: 0.7.1
  - files_external_dropbox: 1.2.0
  - files_external_ftp: 0.2.1
  - files_mediaviewer: 1.0.2
  - files_pdfviewer: 0.11.1
  - files_sharing: 0.12.0
  - files_texteditor: 2.3.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - firstrunwizard: 1.2.0
  - market: 0.5.0
  - notifications: 0.5.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - user_external

Are you using external storage, if yes which one: local/smb/ftp/gd/dp

Are you using encryption: no

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

Client configuration

Browser: Opera

Operating system: W10x64

Logs
Web server error log
nothing relevant
ownCloud log (data/owncloud.log)
nothing relevant

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

Start by reproducing the delete action against the read-only SMB external storage described in the issue, then inspect the files app's delete handling and the resulting ownCloud and web-server logs. Trace where the request waits without an error response. Done means an attempted delete on an unwritable SMB share promptly shows a notification that deletion is not possible.

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
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.