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

Always rename shared folder to a unique name if identical folder name already exists to avoid case sensitivity issues on operating systems like Windows #8638

Closed
e-alfred opened this issue Mar 3, 2018 · 7 comments

Comments

@e-alfred
Copy link

e-alfred commented Mar 3, 2018

Steps to reproduce

  1. User1 (who runs Linux which has case sensitivity) shares folder photo to User2 who has a folder named Photo in his Nextcloud already
  2. User2 runs Windows (which has no case sensitivity) and the Nextcloud client downloads folder which removes all files from the folder photo shared by User1 and puts them into the Photo folder.

Expected behaviour

Nextcloud server should rename shared folder photo in User2's directory to something like photo (1) to avoid issues with case insensitivity.

Actual behaviour

Nextcloud server creates a shared folder photo in User2's directory which already contains a folder Photo. This doesn't happen on Linux or in the web interface, but if a Windows client downloads the shared folder, it puts all files into the already existing Photo folder and deletes them from the folder photo shared by User1.

Server configuration detail

Operating system: Linux 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64

Webserver: Apache/2.4.18 (Ubuntu) (apache2handler)

Database: mysql 5.7.21

PHP version: 7.0.25-0ubuntu0.16.04.1

Nextcloud version: 12.0.5 - 12.0.5.3

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

Where did you install Nextcloud from: Official ZIP file

Array

List of activated apps
Enabled:
 - activity: 2.5.2
 - admin_audit: 1.2.0
 - bookmarks: 0.10.1
 - bruteforcesettings: 1.0.3
 - calendar: 1.5.7
 - caniupdate: 0.1.2
 - checksum: 0.3.5
 - circles: 0.13.6
 - comments: 1.2.0
 - contacts: 2.1.1
 - dav: 1.3.1
 - external: 2.0.3
 - federatedfilesharing: 1.2.0
 - federation: 1.2.0
 - files: 1.7.2
 - files_accesscontrol: 1.2.5
 - files_automatedtagging: 1.2.2
 - files_downloadactivity: 1.1.1
 - files_external: 1.3.0
 - files_markdown: 2.0.4
 - files_pdfviewer: 1.1.1
 - files_reader: 1.2.3
 - files_retention: 1.1.2
 - files_sharing: 1.4.0
 - files_texteditor: 2.4.1
 - files_trashbin: 1.2.0
 - files_versions: 1.5.0
 - files_videoplayer: 1.1.0
 - firstrunwizard: 2.1
 - gallery: 17.0.0
 - issuetemplate: 0.3.0
 - keeweb: 0.4.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.0.0
 - metadata: 0.6.0
 - nextcloud_announcements: 1.1
 - notes: 2.3.2
 - notifications: 2.0.0
 - oauth2: 1.0.5
 - password_policy: 1.2.2
 - provisioning_api: 1.2.0
 - qownnotesapi: 17.5.0
 - ransomware_protection: 1.0.5
 - richdocuments: 2.0.3
  - serverinfo: 1.2.0
 - sharebymail: 1.2.0
 - socialsharing_email: 1.0.3
 - spreed: 2.0.2
 - survey_client: 1.0.0
 - systemtags: 1.2.0
 - tasks: 0.9.6
 - theming: 1.3.0
 - updatenotification: 1.2.0
 - workflowengine: 1.2.0
Disabled:
 - encryption
 - user_external
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "***REMOVED SENSITIVE VALUE***"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "12.0.5.3",
    "installed": true,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "forcessl": true,
    "auth.bruteforce.protection.enabled": true,
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpauth": true,
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpsecure": "tls",
    "filesystem_check_changes": 1,
    "theme": "",
    "maintenance": false,
    "secret": "***REMOVED SENSITIVE VALUE***",
    "overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
    "forceSSLforSubdomains": true,
    "loglevel": 0,
    "logtimezone": "***REMOVED SENSITIVE VALUE***",
    "custom_csp_policy": "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; frame-src *; img-src *; font-src 'self' data:; media-src *",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "localhost",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "localhost",
        "port": 6379
    },
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "trashbin_retention_obligation": "auto",
    "updatechecker": false,
    "log_rotate_size": 104857600,
    "htaccess.RewriteBase": "\/",
    "mysql.utf8mb4": true
}

Are you using encryption: no

Client configuration

Operating system: Windows 7, Debian 9

@c0fe
Copy link

c0fe commented Mar 3, 2018

Issue confirmed using Windows 10 and Ubuntu 16.04 LTS

@c0fe
Copy link

c0fe commented Mar 5, 2018

@MorrisJobke Can you please triage this?

@MorrisJobke
Copy link
Member

client issue I would say ... Nextcloud web UI is case sensitive.

cc @nextcloud/client

@rullzer
Copy link
Member

rullzer commented Mar 7, 2018

Well the client could try to do magic (but this is bound to blow up).

Assume a folder foo with test1.txt and TEST1.txt. The client could rename one to something sure. But this would lead to a lot of extra bookkeeping and is a very non trivial change.

But the most confusing part would be that the user has no clue which file gets renamed. So when looking at their phone they see both files. But locally they see: test1.txt and test1 (2).txt or something.

@e-alfred
Copy link
Author

e-alfred commented Mar 7, 2018

It already blows up. The client shows a message (which almost no user reads because it is is hidden in the client main window) that there is a case sensitivity conflict, but still removes all files from the shared folder and moves them into the non-shared existing folder. In the activity log on the server this shows up as if the user deleted all files from the shared folder.

@c0fe
Copy link

c0fe commented Mar 7, 2018

@rullzer in your example, wouldn't it be practical to then send a signal back to the server to flag that file as problematic if there is going to be a renaming conflict?

@MorrisJobke
Copy link
Member

Duplicate of #9459 - see also owncloud/client#1348 for a long discussion about this.

Sorry that we can't do much here on the server but rather need to look into how to solve it on the client side.

See also https://github.com/nextcloud/desktop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants