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

Removing already deleted shared directories deletes all data #5676

Open
nodomain opened this Issue Jul 10, 2017 · 5 comments

Comments

Projects
None yet
7 participants
@nodomain

nodomain commented Jul 10, 2017

This just happened to me. It was a good opportunity to test my restore processes ;-)

Steps to reproduce

  1. Share a folder (don't know if via link or email makes a difference)
  2. Copy files to that folder
  3. Download the files, delete them
  4. Delete the folder
  5. Go to your shared items - you see an empty item now.
  6. Delete this empty item. An error message appears like "can not delete file ''"
  7. All Nextcloud data is going to dissolve
  8. Sync clients obey and delete data from client :(

Expected behaviour

Share shall be removed even if original folder does not exist anymore - without deleting other data

Actual behaviour

Wrong data (e.g. all) was deleted

Server configuration

Operating system:
Ubuntu latest

Web server:
Apache 2

Database:

PHP version:

Nextcloud version: (see Nextcloud admin page)
12.0.0

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

Where did you install Nextcloud from:
Official sources

Signing status:
No errors have been found.

List of activated apps:

App list Enabled: - activity: 2.5.2 - bruteforcesettings: 1.0.2 - calendar: 1.5.3 - contacts: 1.5.3 - dav: 1.3.0 - federatedfilesharing: 1.2.0 - files: 1.7.2 - files_pdfviewer: 1.1.1 - files_sharing: 1.4.0 - files_trashbin: 1.2.0 - files_versions: 1.5.0 - files_videoplayer: 1.1.0 - gallery: 17.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextant: 1.0.8 - nextcloud_announcements: 1.1 - notifications: 2.0.0 - oauth2: 1.0.5 - password_policy: 1.2.2 - provisioning_api: 1.2.0 - serverinfo: 1.2.0 - sharebymail: 1.2.0 - spreed: 2.0.1 - survey_client: 1.0.0 - theming: 1.3.0 - twofactor_backupcodes: 1.1.1 - twofactor_totp: 1.3.0 - updatenotification: 1.2.0 - workflowengine: 1.2.0 Disabled: - admin_audit - comments - encryption - federation - files_external - files_texteditor - firstrunwizard - keeweb - systemtags - user_external - user_ldap

Nextcloud configuration:

Config report { "system": { "instanceid": "xxx", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "xxx" ], "datadirectory": "\/mnt\/storage\/nextcloud", "overwrite.cli.url": "https:\/\/xx.xxx.cc\/cloud", "htaccess.RewriteBase": "\/cloud", "dbtype": "mysql", "version": "12.0.0.29", "dbname": "owncloud", "dbhost": "localhost", "dbtableprefix": "", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "logtimezone": "UTC", "installed": true, "theme": "", "loglevel": 0, "maintenance": false, "trashbin_retention_obligation": "auto", "enable_previews": "false", "mail_smtpmode": "smtp", "mail_from_address": "tower", "mail_domain": "xxx.cc", "mail_smtphost": "xx.xxx.cc", "mail_smtpport": "587", "asset-pipeline.enabled": true, "memcache.local": "\\OC\\Memcache\\APCu", "updater.release.channel": "beta", "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "tls" } }

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

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
no

Client configuration

Browser:
Chrome latest

Operating system:
OSX

Logs

Web server error log

Web server error log
Insert your webserver log here

I did not try to reproduce since I don't have a test instance.

@rullzer

This comment has been minimized.

Member

rullzer commented Jul 20, 2017

Mmmm that sounds strange.

I tried to follow your steps but could not reproduce this.

1. Share a folder (don't know if via link or email makes a difference)
2. Copy files to that folder
3. Download the files, delete them
4. Delete the folder
5. Go to your shared items - you see an empty item now.

This is already strange. I don't see any item there if I delete the folder

6. Delete this empty item. An error message appears like "can not delete file ''"
7. All Nextcloud data is going to dissolve
8. Sync clients obey and delete data from client :(

Are you doing all this on the web?

@nodomain

This comment has been minimized.

nodomain commented Jul 21, 2017

Yes I did that. But I am afraid to retry ;-)

@user023456789

This comment has been minimized.

user023456789 commented Aug 27, 2017

Same issue here today with an email shared on Nextcloud 12.0.2 from web interface with Chrome.
It can be reproduced on my side by just sharing a folder, deleting it and then deleting the share.

If it can help, here is my application list :
Enabled:

  • activity: 2.5.2
  • admin_audit: 1.2.0
  • admin_notifications: 1.0.0
  • announcementcenter: 3.1.0
  • apporder: 0.4.0
  • bookmarks: 0.10.1
  • bruteforcesettings: 1.0.2
  • calendar: 1.5.3
  • checksum: 0.3.5
  • circles: 0.12.4
  • comments: 1.2.0
  • contacts: 1.5.3
  • dav: 1.3.0
  • external: 2.0.3
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_clipboard: 0.6.4
  • files_external: 1.3.0
  • files_pdfviewer: 1.1.1
  • files_reader: 1.0.4
  • 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
  • groupfolders: 1.1.0
  • lookup_server_connector: 1.0.0
  • nextcloud_announcements: 1.1
  • notes: 2.3.1
  • notifications: 2.0.0
  • oauth2: 1.0.5
  • ocsms: 1.12.1
  • password_policy: 1.2.2
  • previewgenerator: 1.0.6
  • provisioning_api: 1.2.0
  • quota_warning: 1.0.1
  • serverinfo: 1.2.0
  • sharebymail: 1.2.0
  • systemtags: 1.2.0
  • tasks: 0.9.5
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • user_saml: 1.3.2
  • workflowengine: 1.2.0
    Disabled:
  • activitylog
  • dashboard
  • direct_menu
  • encryption
  • files_downloadactivity
  • files_markdown
  • files_w2g
  • logreader
  • nextant
  • ocsms-master
  • orcid
  • richdocuments
  • spreed
  • spreedme
  • survey_client
  • transmission
  • user_external
  • user_ldap
  • weather
  • zenodo
@elman22

This comment has been minimized.

elman22 commented Aug 30, 2017

I managed to reproduce the problem with Nextcloud 12.0.2 doing this:

  1. Create a folder
  2. Share a folder via email allowing only uploads
  3. Upload files to that folder as user with email from step 2
  4. As Nextcloud user go delete the folder
  5. Go to your shared items - you see an empty item now with just icon.
  6. Delete this empty item. An error message appears like "can not delete file ."
  7. All shares from GUI are deleted
  8. Fortunately after page reload all items are there, so nothing was deleted

Only possible workaround I found is to restore folder from trash, remove share and then delete folder.

@sduensin

This comment has been minimized.

sduensin commented Nov 2, 2017

This is mildly terrifying.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment