rclone / rclone/rclone

Allow specifying allowed/disallowed character patterns in a rclone mount

Open
#6,473 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement Remote: SFTP
Dominant language
Go
Stars
59.8k
Forks
5.4k
Avg merge
2d 14h
Merged PRs (30d)
48

Description

The associated forum post URL from https://forum.rclone.org
What is your current rclone version (output from rclone version)?

rclone v1.59.1

What problem are you are trying to solve?

Read this issue first: https://github.com/drakkan/sftpgo/issues/1005

Server-side blocking : character in filename confuses rclone mount.
With --vfs-cache-mode writes, when I try to upload a file with the name test:test, rclone fails and retires uploading endlessly.
Accidentally copying a file with remaining : character in filename, only to find out it didn't get uploaded later is not funny.

Sep 29 19:10:24 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:10:24 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #1, will retry in 10s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied
Sep 29 19:10:33 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:10:33 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #2, will retry in 20s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied
Sep 29 19:10:53 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:10:53 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #3, will retry in 40s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied
Sep 29 19:11:33 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:11:33 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #4, will retry in 1m20s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied
Sep 29 19:12:53 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:12:53 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #5, will retry in 2m40s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied
Sep 29 19:15:33 fedora sh[368464]: ERROR : /test:test: Failed to copy: Update Create failed: permission denied
Sep 29 19:15:33 fedora sh[368464]: ERROR : /test:test: vfs cache: failed to upload try #6, will retry in 5m0s: vfs cache: failed to transfer file from cache to remote: Update Create failed: permission denied

Mounting with --vfs-cache-mode off instead doesn't fix the issue and rather makes it worse, as the "illegally" named file tends to outright disappear and your data is lost.

How do you think rclone should be changed to solve that?

I want rclone mount to be able to disallow certain characters in filename, so when user tries to create or copy a file with that specific character in filename, it's blocked by rclone directly, rather than sending to the server only to get rejected.

Maybe a new flag like --filename-disallow-character-pattern "*:*" or --filename-allow-character-pattern "a-z, A-Z, 0-9" under rclone mount, which makes the corresponding FUSE mount to disallow the use of specific character patterns. Any existing files with disallowed characters on the remote should be invisible to the user.

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the rclone mount entry point and trace filename creation, uploads, and remote listings in the scenario involving --vfs-cache-mode writes. Clarify the allowed and disallowed pattern syntax, how existing remote files are handled, and what mount behavior counts as complete; the issue names no source files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.