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

deleted files reappear over and over #12281

Closed
JarbyDev opened this issue Nov 5, 2018 · 38 comments · Fixed by #37448
Closed

deleted files reappear over and over #12281

JarbyDev opened this issue Nov 5, 2018 · 38 comments · Fixed by #37448
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 25-feedback bug client: 💻 desktop

Comments

@JarbyDev
Copy link

JarbyDev commented Nov 5, 2018

Steps to reproduce

We have a shared Folder, where we deleted files and directories. Not all clients are online at the same time.
In irregular intervals earlier deleted files and directories reappear over and over. We try to delete them, but don´t get rid of them.

Expected behaviour

Sync the local folder to the server state.
When ready: sync bidirectional.
You can not get rid of files or folders as long as at least one client which collaborate is offline and keep the deleted files. They get pushed back over and over and soon the offline clients get connected.

Actual behaviour

Sync bidirectional, pushing up all locally kept files/folders, which are not on the server back to it.

Server configuration detail

Operating system: Linux 4.15.0-1025-aws #25-Ubuntu SMP Wed Oct 10 14:23:49 UTC 2018 x86_64

Webserver: Apache/2.4.29 (Ubuntu) (apache2handler)

Database: mysql 5.6.10

PHP version:

7.0.32-3+ubuntu18.04.1+deb.sury.org+1
Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, Reflection, SPL, session, standard, apache2handler, mysqlnd, PDO, xml, apcu, apc, calendar, ctype, curl, dom, mbstring, fileinfo, ftp, gd, gettext, iconv, igbinary, imagick, intl, json, ldap, exif, mcrypt, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, soap, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, wddx, xmlreader, xmlrpc, xmlwriter, xsl, zip, libsmbclient, Zend OPcache

Nextcloud version: 14.0.3 - 14.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.0.1
 - activity: 2.7.0
 - admin_audit: 1.4.0
 - bruteforcesettings: 1.1.0
 - cloud_federation_api: 0.0.1
 - comments: 1.4.0
 - dav: 1.6.0
 - dropit: 0.1.1
 - external: 3.1.0
 - federatedfilesharing: 1.4.0
 - files: 1.9.0
 - files_accesscontrol: 1.4.0
 - files_pdfviewer: 1.3.2
 - files_rightclick: 0.8.4
 - files_sharing: 1.6.2
 - files_texteditor: 2.6.0
 - files_trashbin: 1.4.1
 - files_versions: 1.7.1
 - files_videoplayer: 1.3.0
 - gallery: 18.1.0
 - groupfolders: 1.3.3
 - impersonate: 1.1.0
 - issuetemplate: 0.4.0
 - logreader: 2.0.0
 - lookup_server_connector: 1.2.0
 - metadata: 0.7.0
 - notifications: 2.2.1
 - oauth2: 1.2.1
 - password_policy: 1.4.0
 - previewgenerator: 1.1.0
 - provisioning_api: 1.4.0
 - serverinfo: 1.4.0
 - sharebymail: 1.4.0
 - sharerenamer: 2.2.0
 - socialsharing_email: 1.0.4
 - survey_client: 1.2.0
 - systemtags: 1.4.0
 - theming: 1.5.0
 - twofactor_backupcodes: 1.3.1
 - updatenotification: 1.4.1
 - user_usage_report: 1.1.0
 - w2g2: 2.2.3
 - workflowengine: 1.4.0
Disabled:
 - encryption
 - federation
 - files_downloadactivity
 - files_external
 - files_trackdownloads
 - firstrunwizard
 - nextcloud_announcements
 - support
 - user_external
 - user_ldap

Configuration (config/config.php)
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "drive.company.com"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "14.0.3.0",
    "overwrite.cli.url": "https:\/\/drive.company.com\/",
    "htaccess.RewriteBase": "\/",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "logtimezone": "America\/New_York",
    "logdateformat": "l, F d, Y h:i:s a",
    "log_rotate_size": 10485760,
    "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
    "loglevel": 3,
    "cron_log": true,
    "syslog_tag": "Nextcloud",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": 587,
    "mail_smtptimeout": 10,
    "mail_smtpsecure": "tls",
    "mail_smtpauth": true,
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "debug": false,
    "wnd.logging.enable": false,
    "filelocking.debug": false,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "filelocking.enabled": "true",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "enable_avatars": true,
    "knowledgebaseenabled": false,
    "remember_login_cookie_lifetime": 1296000,
    "trashbin_retention_obligation": "30, 31",
    "versions_retention_obligation": "30, 31",
    "enable_previews": true,
    "updater.server.url": "https:\/\/updates.nextcloud.com\/updater_server\/",
    "updater.release.channel": "stable",
    "check_for_working_webdav": true,
    "check_for_working_wellknown_setup": true,
    "has_internet_connection": true,
    "check_for_working_htaccess": true,
    "cipher": "AES-256-CFB",
    "minimum.supported.desktop.version": "1.7.0",
    "singleuser": false,
    "theme": "",
    "appcodechecker": true,
    "activity_expire_days": 365,
    "data-fingerprint": "8b40196ad1c7fb6bc7c6512fb8ae9f79"
}

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

Are you using encryption:

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

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:63.0) Gecko/20100101 Firefox/63.0

Operating system: Windows 10 Pro

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #9523 (A file completely disappears after deleting from a group folder), #1708 (Sharing: Cannot delete files from share ), #11574 (After deleting image, the preview files remain forever), #4451 ("Delete Calendar" Issue), and #9594 (Unable to delete or create files).

@Punkado
Copy link

Punkado commented Nov 19, 2018

This is a really old and annoying problem that people are having since Owncloud. I had this problem and i am having it now again, same thing as you. Looks like is a problem in the Nextcloud client on Mac and Windows, i didn't have the problem with the client on Linux, and i dont have a Windows machine now to check, but years ago in the Mac client, i saw a option that solved the problem...

@Punkado
Copy link

Punkado commented Nov 19, 2018

I found some old notes about the owncloud check if works:

Open the %LOCALAPPDATA%\ownCloud\owncloud.cfg
In general, change the line to:
promptDeleteAllFiles=false

@AKKlostermann
Copy link

I don't quite see how the promptDeleteAllFiles setting should make a difference. As far as I understand the source code, the client would issue a message box when this is true. When the setting is left out, it doesn't do so, however.

I have this problem with a Nextcloud instance serving about 20 clients. It's extremely annoying and happens with a couple of files, especially folders, but the permissions on the server are ok, and so far I could not determine why these folders are "special".

The client briefly issues a red warning and the log contains "Cannot remove directory". This seems to happen on every affected client.

@AKKlostermann
Copy link

With one of the affected folders I get the following error for the parent(!) directory, when I delete it: ""disk_free_space(): No such file or directory at /var/www/nextcloud/lib/private/Files/Storage/Local.php#299"

With a debug statement I discovered that the path which is passed to @disk_free_space is missing the "files" part. Instead of /var/www/nextcloud/data/username/files/etc I get something like /var/www/nextcloud/data/username/etc which of course does not exist!

@AKKlostermann
Copy link

I compared the sqlite databases from two clients synchronizing the same folders from the same server, one is reuploading a certain file, the other does not. The affected client's database contains additional files which have been deleted previously and don't exist on the server or the local folders anymore.

I checked the metadata record of one of the affected files, and they are identical except for the "inode" column. The inode in the affected database is significantly higher. I don't know yet what this means, but it is a difference...

@gixxxerg
Copy link

the issue still remains even with group folders version 2.0.2

it is NOT client related because we don't use desktop client (only browser based access)

files/folders are not deleted from the file tree /var/www/html/nextcloud/data/__groupfolders/groupname/trash/groupnumber

@AKKlostermann
Copy link

There may be several causes leading to the same symptoms. In our case it's definitely the client because reinstalling the client helps.

One of the most useful ways to investigate this issue is through watching the activity feed. Either on the web client or directly with the database. Normally some user will be associated with the reuploading. If not, there must be something happening on the server side.

@gixxxerg
Copy link

in the web interface it is a bug
when selecting the file on the left side and then selecting delete from the menu does not delete the file
see image:
nodeletion

when deleting the file one at a time on the right side however, the files does get deleted
see image:
deletion

@kesselb
Copy link
Contributor

kesselb commented Jan 16, 2020

Do you still see this issue? Some issues with selected files and delete and restore operations were fixed recently.

@manfredheitlager
Copy link

oh ghees.. since then I have upgraded to 17.0.2, but even in that version the issue still exists

@kesselb
Copy link
Contributor

kesselb commented Jan 16, 2020

oh ghees.. since then I have upgraded to 17.0.2, but even in that version the issue still exists

The issue with the deleted files coming back right? I'm asking because there are two more problems in this thread ;)

  • Files are restored if at least one sync client was offline and missed the delete event.
  • Something with file select and delete
  • disk_free_space(): No such file or directory at

Thanks 👍

@manfredheitlager
Copy link

manfredheitlager commented Jan 16, 2020

yes correct... same issue still exists like the post I made with the menu pictures.

trying to delete a complete row of deleted files and using the top menu above it to seletec delete doesn't delete any of the files.

there is a trick though.. if you select multiple files manually and then use the same menu to delete it actually works and the files are gone.
Just not when you use the select all butoon and then try to delete at once.

@skjnldsv
Copy link
Member

@kesselb any clue?

@kesselb
Copy link
Contributor

kesselb commented Apr 10, 2020

@skjnldsv No.

@ghost
Copy link

ghost commented May 10, 2020

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label May 10, 2020
@kesselb kesselb removed the stale Ticket or PR with no recent activity label May 10, 2020
@ghost
Copy link

ghost commented Jun 9, 2020

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

@ghost ghost added the stale Ticket or PR with no recent activity label Jun 9, 2020
@ghost ghost closed this as completed Jun 23, 2020
@fearricepudding
Copy link

fearricepudding commented Sep 16, 2020

I seem to be getting this issue, not sure when it started but noticed it last week. I've tried deleting the files using select and delete on the webpage, delete on the single file on the webpage and though the sync client on linux, no errors or warnings on server or client but other users which the file is shared to are re-uploading the file after its deleted.
Did anyone find a solution?

@kaeltis
Copy link

kaeltis commented Oct 7, 2020

We are also experiencing the exact issue @jmartin-oss is describing.
Could this please be re-opened @skjnldsv ?

@skjnldsv skjnldsv reopened this Oct 7, 2020
@ghost ghost removed the stale Ticket or PR with no recent activity label Oct 7, 2020
@skjnldsv skjnldsv added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Oct 7, 2020
@skjnldsv
Copy link
Member

skjnldsv commented Oct 7, 2020

cc @nextcloud/desktop ring a bell? Should this be in the desktop repo?

@er-vin
Copy link
Member

er-vin commented Oct 8, 2020

At least it doesn't ring any bell to me...

@jmartin-oss
Copy link

I upgraded NC to v19 and the issue still persists. For now, I detected that the issue is related with one user...
For testing I uninstalled the Windows Sync Client (2.6.5) and installed latest version (3.0.2)
Sync was fine at first, then it was 9 days offline, after get back online it started to reupload a lot of deleted folders (by other users) instead of deleting them in the local copy.

In the audit log, you can see that once connected you can see that the client is polulating folders and pushig all the deleted files.
Then, all other users sync client start to download the reuploading files.

Do you know anything that I can try to debug the problem?

@thorrrr
Copy link

thorrrr commented Oct 30, 2020

I am having the same issue anything I delete it restores files or folders. Never had this issue before, but I get an error saying error deleting

https://cdn.discordapp.com/attachments/642060061988093953/771774802624905236/unknown.png

@vsoth
Copy link

vsoth commented Nov 27, 2020

Hey there we run on 18.0.9 (client 3.0.1) and having exactly the same problems. One client (was offline for a long time … like 2–4 weeks). Files deleted from other clients, were uploaded again from the "old" client when we startet it again.
I do not see any points why exactly this client is reuping everything and other in our office don not.

Do you need any further information or help to take a deeper look into that?
THX

@jmartin-oss
Copy link

The issue is still present on v19.0.5.
Observing it, it doesn't seem that need to much time offline to happen. If all the clients are online there's no issue but when a client is offline and other remove files.... then this client back online and restores all the deleted files.
It also happens when there's a conflict uploading files.

These are my assumptions because I didn't fount any trace or error in the logs that can figure out why it's happening.

@GaryJamesYoung
Copy link

This is occuring in 19.04 and clients 3.03. Major impact on our CAD files, used to validate products sent to customers.
Does anyone at NEXTCLOUD even monitor these threads ?

@ChristophHaag
Copy link

One client (was offline for a long time … like 2–4 weeks).

Same thing happened to the client on a laptop of mine that was offline for a few weeks/months.

Even if the root cause is hard to fix, it would be extremely helpful if the client asks the user for confirmation before restoring multiple files at once.

@iljur
Copy link

iljur commented Apr 7, 2021

Same here: One Windows client constantly reupping files to shared folders/group-folders deleted by other users.
NC 21.0.0, windows client 3.1.3

@Sim0nW0lf
Copy link

Sim0nW0lf commented May 4, 2021

We have the same issue in our company and it is really a big Problem for us.
Managing many files is impossible when reorganized files get reuploaded all the time.

I don't really understand why this is not labeled as a high priority bug since it makes Nextclouds core functionality unusable!? The only thing we can't do reliably is saving and organizing data...
Don't you think so too @skjnldsv?

@iljur
Copy link

iljur commented May 4, 2021

Try to figure out which client is reupping the files. Completely deinstall and purge (!) that client including configuration data. I think that fixed it for us.

@Sim0nW0lf
Copy link

@iljur Thanks for your suggestion! :)
The strange thing is, that a completely new client (1week old) re-uploaded everything. But I will probably try it anyways... Maybe we will test this further, since it is necessary that we work around this issue until it's fixed.

@Sim0nW0lf
Copy link

I have tried everything I can think of now...
In Version 14.0.3 this bug was registered and it is still present in my Nextcloud Hub II (23.0.0) with V3.4.1 Client. Also switching to virtual data in the client didn't help.
We completely reinstalled PCs but that doesn't help. We switched to docker, everything is up to date but it doesn't help.
I am sure this must be a bug which needs to be fixed or is there any suggestion left we haven't tried?

Configuration Setup

My system is running Docker version 20.10.12, nextcloud:apache, currently Nextcloud Hub II (23.0.0) with redis and Traefik in my docker-compose.yml on amd64

The only solution I can think of to solve this problem at the moment is to move away from Nextcloud which I really don't want to do because everything else is just so awesome :/
Also: In my personal cloud I don't have sync problems but I also don't move/delete files with multiple clients (about 8) all the time.
In our company we do move and delete many files every day and I have to go through the activities everyday to clean up the reuploaded mess...

Will this issue be adressed again?

@Sim0nW0lf
Copy link

Sim0nW0lf commented Jan 11, 2022

nextcloud/desktop#3240
nextcloud/desktop#3270
These are related issues.
I am not sure if this is a serverside or a client side problem.
There have been corrections on the client side already and the issues were closed but I tested the newest version and when I move/delete many files the issue is still there.

@ecker00
Copy link

ecker00 commented Nov 18, 2022

Experienced this, reinstalled windows client seemed to help.

@szaimen
Copy link
Contributor

szaimen commented Jan 9, 2023

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 9, 2023
@DenisBessa
Copy link

Hi, I'm experiencing this exact same issue on my instance. I'm running on v25.0.4.

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 25-feedback bug client: 💻 desktop
Projects
None yet
Development

Successfully merging a pull request may close this issue.