[Solved] Sync fails when file/directory names contain commas

Hello
It seems that sync fails when a file or directory contains a comma (error message in the desktop client: operation cancelled)
The client log contains errors like this (partly in french but clear):

||Books/calibre/Brussolo,Serge|INST_ERROR|Up|1462090105||4096||6|Cet élément n'a pas été synchronisé en raison des erreurs précédentes : Error  downloading https://<mydomain>/nextcloud/remote.php/dav/files/<myemail>/Books/calibre/Brussolo,Serge - server replied: Forbidden|0|0|0|||INST_NONE|  2725 
||Books/calibre/Brussolo,Serge/Baignade accompagnee (1748)|INST_NEW|Up|1462101425||4096||1|Operation canceled|0|0|0|||INST_NONE|   2726 
||Books/calibre/Brussolo,Serge/Captain Suicide (1792)|INST_NEW|Up|1462101429||4096||1|Operation canceled|0|0|0|||INST_NONE|   2727 

If I rename the file/directory and just remove the comma, then it starts working again…

No answer to this? I think it’s a real bug!
I checked again and as soon as you put a comma in the name of a file or directory, you get a 403 return from the server.
To check, just try to go to this link in your browser (after replacing the path to the server and the user, the file does not ned to exist on the server):
https://path/to/nextcloud/remote.php/dav/files/your_account/dir/file,test.jpg
==> this leads for me to a 403 error
If you juste replace the comma in file,test.jpg by a dot:
https://path/to/nextcloud/remote.php/dav/files/your_account/dir/file.test.jpg
==> I get the authentication window!

I tried it on file names and folder names. Works without problem with my NC 12.0.3, syncs also to a Win10 client, works also with federated sharing. Perhaps your webserver configuration?

I found similar reports here on the forum but there were not enough details on their config for more conclusions:

Hi @tflidd, thanks for replying
I searched the forum for the problem but did not find anything, you’re better than me at that task :slight_smile:
Our common point with the second one is raspberry pi but I can create files with commas, and I also have a seafile server on this pi (currently migrating from seafile to nextcloud) and seafile has no problem with commas…

I also have the same kind of trouble (403) with all files that end with .sql although I have no filter on this.

Which webserver do you use? Do you use the config from the documentation? Could be that the webserver is filtering such filenames by default, same thing with certain extensions. Seafile spins up their own webserver…

I’m using Apache and the config is the one from the documentation
My seafile server is proxied by the same apache (another vhost)…

Or run apache in debug mode to see where exactly the error is coming from. 403 could also be permission issues or the file system where you save does not support commas. Please provide more information, perhaps you are running a very old version of Nextcloud, we don’t even know which kind of operating system you are using, neither the modules or apps that are used. You could probably also block some extensions with the file access control app. Also don’t only try the client, try the interface as well. Also keep an eye on your security products (firewalls, virus scanner, …).

Like this we can’t help you. I could argue that I run also apache and Nextcloud and don’t have any problems with commas, also there are only very few users with this problem, so it is neither a problem with apache nor with Nextcloud.

Sorry, I’m running the latest version of NC (12.0.3.3) on a raspbian stretch up to date.
I can create files with commas in my file system and files in the same directories where I have problems are correctly synced by the desktop app so not a right …
Enabled:

  • activity: 2.5.2
  • calendar: 1.5.6
  • circles: 0.13.6
  • comments: 1.2.0
  • contacts: 2.0.1
  • dav: 1.3.0
  • deck: 0.2.5
  • federatedfilesharing: 1.2.0
  • federation: 1.2.0
  • files: 1.7.2
  • files_accesscontrol: 1.2.5
  • files_external: 1.3.0
  • files_external_dropbox: 1.0.0
  • files_opds: 0.8.2
  • files_pdfviewer: 1.1.1
  • 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
  • logreader: 2.0.0
  • lookup_server_connector: 1.0.0
  • mail: 0.7.4
  • nextcloud_announcements: 1.1
  • notes: 2.3.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
  • survey_client: 1.0.0
  • systemtags: 1.2.0
  • tasks: 0.9.5
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • updatenotification: 1.2.0
  • workflowengine: 1.2.0
    Disabled:
  • admin_audit
  • bruteforcesettings
  • encryption
  • external
  • rainloop
  • socialsharing_email
  • socialsharing_facebook
  • user_external
  • user_ldap

I will put the LogLevel at Debug and come back with more information

You said it is on your local filesystem, no external storage (either mounted by OS or NC)? I have also checked on the test systems where this is working (https://help.nextcloud.com/t/demo-instances-of-9-10-11-and-12-now-live).

What OS are you using? If you put a file into your DocumentRoot, can you download it when it contains a comma in the file name (not inside the Nextcloud-folder), or take a different virtual host. If in a different folder, you have the same problem, then it is likely somewhere in your apache config. If you are using CentOS, take a look into SELinux, this often blocks things and is hard to find out.

As I said in previous messages, my NC runs on Raspbian Stretch.
Finally, I suspect the problem comes from the desktop client. It says “server said forbidden” but I can’t find any trace of the request on the server side… And the desktop client contains starnge messages “keep on blacklist: Error downloading xxx, Server replied: Forbidden” as if it had the file name in cache and it didn’t try any more…
When I mount the webdav address of my nextcloud in Nemo on my Linux Mint laptop, I can create files that contain commas…
So, it’s not an apache issue, the webdav goes through the apache…

Sorry, I didn’t find it directly :sweat:

Perfect, so the server can handle it. However, we don’t know why the client fails. Can you try a webdav client on the client that has the problem (for Win e.g. Cyberduck or WinSCP)?
For the client software, I still use the original ownCloud client version 2.3.4 (NC currently only provides their own theme, for NC 13 they announced their own client). And keep an eye on your security products (firewall, anti-virus) …

I mounted the webdav in Nemo on the client machine where I have upload problems and it works.
So both the server and the client machines seem to be able to handle it and there is no security issue…

I tried to upload a file name xxx.sql (as I said, I have also problems on these sql files) through the web interface and it also failed with the message “forbidden” the first time. Then, I tried again and it succeeded!

I then tried with a directory and a file with a comma in their name (trough the web site) and, it worked from the first time…
I’m a bit lost… :confused::tired_face::upside_down_face:

Well, I finally installed the owncloud 2.3.4 client on my machine and it started to work… :astonished::flushed::scream:
Still working on my 15GB, but all files passed already have been correctly uploaded to the server.
I didn’t change anything in the client directory (didn’t remove the sqlite files, …).
Puzzled. Probably a bug fixed between 2.3.2 and 2.3.4…