desktop icon indicating copy to clipboard operation
desktop copied to clipboard

[Bug]: FileNameInvalid due to ":" in filename (nextcloudcmd)

Open edent opened this issue 2 years ago • 6 comments

⚠️ Before submitting, please verify the following: ⚠️

Bug description

I use Linux and have a ZFS file system. When I run ./nextcloudcmd to sync, I get this error:

[ warning nextcloud.sync.propagator ]: Could not complete propagation of "2012-10-30 09:05:09.png" by OCC::PropagateIgnoreJob(0x55be1e29caf0) with status OCC::SyncFileItem::FileNameInvalid and error: "File names containing the character \":\" are not supported on this file system."

I can manually create files which have the : character in their filename. So I am not sure where NextCloud is getting this information from. The files exist on a different Linux machine which has the ext4 filesystem.

Steps to reproduce

  1. Create a file with a colon in the file name
  2. Try to sync to a ZFS filesystem.

Expected behavior

NextCloud should know that ZFS supports the : symbol.

Which files are affected by this bug

2012-10-30 09:05:09.png

Operating system

Linux

Which version of the operating system you are running.

Ubuntu 22.04

Package

Appimage

Nextcloud Server version

25.0.3

Nextcloud Desktop Client version

3.8.0

Is this bug present after an update or on a fresh install?

Fresh desktop client install

Are you using the Nextcloud Server Encryption module?

Encryption is Enabled

Are you using an external user-backend?

  • [ ] Default internal user-backend
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Nextcloud Server logs

No response

Additional info

I am using a headless server, so I can't get the desktop client logs.

edent avatar Apr 10 '23 07:04 edent

The only reference I can find in the source is:

https://github.com/nextcloud/desktop/blob/d4f5081f91dea3816c7a2afd62e03ee8769e754e/src/csync/csync_exclude.cpp#L180

Does my NextCloud app think I'm running on Windows?

edent avatar Apr 10 '23 07:04 edent

We exclude all characters that might cause issues on any of the operating systems the sync client runs on -- this is to prevent a file which might work on Linux from breaking sync for a macOS client or a Windows client.

Agree that the log message is not very accurate or helpful, though, this can be changed.

claucambra avatar Apr 10 '23 10:04 claucambra

I'm confused. I went into my NextCloud provider's web interface and renamed a file to test:colon.pdf.

I ran the Linux GUI sync, and it happily downloaded the file:

Screenshot showing a success message.

So it seems to me that the GUI copes with this - but the command-line version doesn't.

edent avatar Apr 10 '23 11:04 edent

The web UI is not as restrictive with filenames as the client is. Both the CLI and GUI clients use the same code to handle file propagation, so in this term there is no different when uploading files from the client side -- download is more permissive

claucambra avatar Apr 10 '23 12:04 claucambra

I am talking about download.

  • On the web server, I create a new file which has a colon.
  • On my laptop running Linux, the GUI downloads and creates the file when it syncs.
  • On my Pi running Linux (with no GUI), the nextcloudcmd command refuses to download the file.

How can I make the CLI behave in the same way as the GUI?

edent avatar Apr 10 '23 12:04 edent

I have the same issue: I want to sync files using the nextcloudcmd cli from my server to a linux machine. The files were originally synced to the server by a different linux machine usingthe linux desktop client application. So there is no issue there. When I use nextcloudcmd I get the same error with the ":" in the file name.

Small detail: I am running the nextcloudcmd on WSL in windows 11. But the OP said this is also happening on bare metal linux installs.

yumasheta avatar Feb 17 '24 23:02 yumasheta