Desktop: Ignore File List Does Not Work

Created on 21 Oct 2019  路  8Comments  路  Source: nextcloud/desktop

Expected behaviour

Do not sync folders with vendor name inside www which can be anywhere in the system.

String used
*www/vendor/

folders that were to be ignored

/home/name/jobs/job1/www/vendor
/home/name/jobs/job2/www/vendor
/home/name/jobs/job3/www/vendor

In Linux Mint 19 does not work, in Windows 10 it works

Actual behaviour

On Linux Mint 19 operating system the client is sending the files to the server.

In Windows 10 everything is fine.

Steps to reproduce

  1. open nextcloud client
  2. go to the general tab
  3. click "edit skipped files"
  4. click on "add"
  5. enter *www/vendor/
  6. click "ok"
  7. restart the client
  8. Create any folder structure that contains www / vendor on your PC.
  9. put files inside "vendor"
  10. see on web client that files have been uploaded to server (this may take a while)

Client configuration

Client version: 2.6.0git.

mateus@mateus-pc:~$ nextcloudcmd -v
Nextcloud version 2.6.0git
Using Qt 5.9.5, built against Qt 5.9.5
Using 'OpenSSL 1.1.1 11 Sep 2018'

Operating system: Linux Mint 19.1 - Cinnamon 4.0.10

OS language: PT-BR

Client package (From Nextcloud or distro) (Linux only): distro

Installation path of client:

$ sudo find / -name nextcloud -type d
/usr/share/doc/libnextcloudsync0
/usr/share/doc/nextcloud-client
/usr/share/doc/nextcloud-client-l10n
/usr/share/nextcloud
/usr/lib/x86_64-linux-gnu/nextcloud

Nextcloud version:

Storage backend (external storage):

Logs

https://gist.github.com/mateusfmello/5b8c8669aeeeed87ab03eb18efc438ad

bug feature sync engine

Most helpful comment

Reproducable on Debian 10, too. Cannot believe this bug has been open for this long.

This bug is serious and has major security-related consequences, if you excluded folders because they are not supposed (or not allowed to) be uploaded (e.g. because of an active NDA). It also heavily affects my workflow while developing, because logfiles / .git-repositories are being synced for no reason.

This needs to be addressed ASAP.

All 8 comments

Having a similar issue. Added some new folders on one client, and ignored files appeared to be working. I restarted my server instance; on reconnection the client uploaded several gigabytes of files that had been set to be ignored.

Most egregiously, it seems that some of the ignored files have since been deleted from the client and now only exist on the server.

Specifically, the prog directory has .stack-work in its ignored files list. With a structure prog/lang/hs/eg/.stack-work, the .stack-work folder (200MB big) has been uploaded to the server, but its contents have been removed from the client.

The client correctly shows the amount of used server space for the prog folder, but expanding the tree to eg, the .stack-work folder is still hidden as though correctly ignored.

The potential for data loss here makes this a very serious issue.

Same here with Manjaro KDE (3 machines) - ignored files list in NC desktop client doesn't work. The worst part is that "._sync*" files get downloaded from server during every synchronization because of this.

Reproducable on Debian 10, too. Cannot believe this bug has been open for this long.

This bug is serious and has major security-related consequences, if you excluded folders because they are not supposed (or not allowed to) be uploaded (e.g. because of an active NDA). It also heavily affects my workflow while developing, because logfiles / .git-repositories are being synced for no reason.

This needs to be addressed ASAP.

I fall in the same situation and for an urgent solution I've managed to exclude some FolderNameToExclude folder with following ugly hack inserting manually exclusion and compiling: just place your exclusion in this line of src/cmd/cmd.cpp

engine.excludedFiles().addManualExclude("FolderNameToExclude");

for a guide on how to compile for a ubuntu focal see this dockerfile

Other observations:

  • if want to un-ignore a correctly ignore folder specified through a .sync-exclude.lst file and removal of the corresponding line in exclude list not work as workaround I seen that stopping cmdline, removing exclude list file and restarting cmdline make it to sync again ( may some cache built against these sync-exclude list suffer from fresh update once they changed )

It's working on 3.0.2, not working on 3.0.3 for me

I have fixed it with #2540. Please try it in 3.1 rc2:
https://github.com/nextcloud/desktop/releases/tag/v3.1.0-rc2

Thanks, I confirm it works.
I recompiled as of latest master (4886525e08298171d71afc1deac3482d4305d4db) fews commits after your PR, without my workaround, with .sync-exclude.lst file and this time it recognized excluded folder.

thanks @devel0.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Engineer-of-Stuff picture Engineer-of-Stuff  路  3Comments

dkebler picture dkebler  路  3Comments

MichaIng picture MichaIng  路  3Comments

RobertZenz picture RobertZenz  路  3Comments

linucksrox picture linucksrox  路  3Comments