Ignored files — Prevent upload of undesired files and folders

Expected behaviour

According to what is described in OwnCloud docs, adding my folder /home/rui/Documents/Jobs/[1234] Folder with Huge Files/ to the list of ignored patterns should prevent it from being uploaded.

Actual behaviour

The folder is uploaded and a large portion of my limited user quota is wasted as a result.

Steps to reproduce

  1. “General” > “Edit Ignored Files”
  2. “Add” /home/rui/Documents/Jobs/[1234] Folder with Huge Files/ (or Jobs/[1234] Folder with Huge Files/, or even */Jobs/[1234] Folder with Huge Files/).
  3. Wait for syncing. Any local file inside the folder is now undesirably uploaded.
  4. A deletion of any remote file inside the folder causes the deletion of the local file, proving that it is not “ignored”.

A new line might be visible at /home/rui/.local/share/data/ownCloud/sync-exclude.lst:
/home/rui/Documents/Jobs/[1234] Folder with Huge Files/

Server configuration

Operating system: unknown to me

Web server: [private server running inside my university]

Database: unknown to me

PHP version: unknown to me

ownCloud version: unknown to me

Storage backend (external storage): unknown to me

Client configuration

Client version: v2.5.4 (build 515, Git revision fcdf54

Operating system: Fedora 30 with Gnome 3.32.2

OS language: English

Qt version used by client package (Linux only, see also Settings dialog): 5.12.1, OpenSSL 1.1.1c FIPS 28 May 2019

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

Installation path of client: /opt/ownCloud/ maybe? (a lot of files is listed there by locate OwnCloud)

Logs

  1. Client logfile: Output of owncloud --logwindow or owncloud --logfile log.txt
    (On Windows using cmd.exe, you might need to first cd into the ownCloud directory)
    (See also http://doc.owncloud.org/desktop/2.2/troubleshooting.html#client-logfile )

Errors with Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway. gui.application: Already running, exiting...

But I don’t believe it’s got anything to do with the current issue.

  1. Web server error log: unavailable to me

  2. Server logfile: ownCloud log (data/owncloud.log): unavailable to me

Paths don’t work here, only patterns.

1 Like

Hi, @hodyroff, thanks for your reply.

But I tried the pattern */Jobs/[1234] Folder with Huge Files/. According to the docs , shouldn’t it match my entire folder?

Also, the docs are not very specific as to whether the patterns are matched against the local absolute (“full”) path of the files/folders, or else to the remote path (which, in my case, starts with Backup/Jobs/...).

This could make the difference for other cases, but in my case, I tried a lot of patterns and none of them causes my folder to be ignored.

Thanks again for the help, it is highly appreciated as I still haven’t found the solution :cry:

Basically you can’t use slashes inside the pattern. Therefor you can’t define a path.
You can define to ignore “Jobs” in which case any file or folder which is called “Jobs” will be ignored.
The patterns are matches against any file or folder name which gets synced. When you define “Jobs/” it will be only folders with that name.

Thats why, to exclude specific folders, we have the deselection process going on in addition …

Hope this makes sense now … it might well be that your specific problem can’t be solved, I can only explain to you what ownCloud has available for you to come close to your needs …

1 Like

Are you sure that “you can’t use slashes inside the pattern”? And, do you mean “by design” or “as a matter of fact”?

The doc refer to “the pattern matching documentation”, which says how slashes are (supposed to be) interpreted (see “ 2.13.3 Patterns Used for Filename Expansion”).

So as I understand, exclusion using slashes is supposed to work.

Bug or feature?

As a matter of fact. Its however not a bug, likely a design flaw but thats what it is.

1 Like

Thanks for the clarification. However, some parts are still blurry for me :smiley:

What is the “deselection process” you were referring to?

And I don’t really get the distinction between “pattern recognition” and “path recognition”.

Finally, is there any way I can exclude folders that are called debug only if they are within a target folder? Since I suppose that using the target/debug pattern will not work… Would the target?debug pattern work as a workaround?

Thanks

I would recommend to do some tests, I did some quick tests on linux and there the path seperator definitely worked in the ignored files list:
I created the following folder structure

test/debug
test/test-debug

I created two rules:

  1. test/debug
  2. test?debug

While the rules were active I dropped the folder structure into my synced ownCloud folder.
Both folders weren’t synced.
When I deleted rule #1 the folder test/debug was synced.

My ownCloud client version is: Version 2.6.3rc4 (build 2599). On Kubuntu 20.04.

EDIT: I would strongly recommend to build stronger test scenarios, with synced and ignored objects, files and folders.