Permissions error on --exclude directory

What is the problem you are having with rclone?

It feels like permissions need to satisfied before executing an --exclude flag. "Computers:-)". I tried excluding a Synology "#recycle" directory but it errors out trying to read that directory.

A OSX Terminal can change to the directory but I still think it is a weird system folder that Synology doesn't want me reading. And clearly I don't want to copy it.

Also can the exclude be a regex? On OSX files titled /.DS_Store are not something you ever need or should copy.

rclone sync --dry-run --log-level=INFO --exclude "/Volumes/AppleShared/#recycle" /Volumes/AppleShared Wasabi:als-loveboat/AppleShared
2021/05/11 15:52:56 ERROR : #recycle: error reading source directory: failed to read directory entry: fdopendir /Volumes/AppleShared/#recycle: permission denied
]

What is your rclone version (output from rclone version)

rclone v1.55.0

  • os/type: darwin
  • os/arch: amd64
  • go/version: go1.16.2
  • go/linking: dynamic
  • go/tags: cmount

Which OS you are using and how many bits (eg Windows 7, 64 bit)

OS X Catalina and Synology Disk Station (The mount is on Synology)

Which cloud storage system are you using? (eg Google Drive)

Wasabi albeit in this case the issue is local.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Paste command here
```rclone sync --dry-run --log-level=INFO --exclude "/Volumes/AppleShared/#recycle" /Volumes/AppleShared Wasabi:als-loveboat/AppleShared



#### The rclone config contents with secrets removed.  
<!--  You should use 3 backticks to begin and end your paste to make it readable.   -->

Paste config here




#### A log from the command with the `-vv` flag  
<!-- You should use 3 backticks to begin and end your paste to make it readable.  Or use a service such as https://pastebin.com or https://gist.github.com/   -->

Paste log here

2021/05/11 16:06:14 DEBUG : Using config file from "/Users/allenstrand/.config/rclone/rclone.conf"
2021/05/11 16:06:14 DEBUG : rclone: Version "v1.55.0" starting with parameters ["rclone" "-vv" "sync" "--dry-run" "--exclude" "/Volumes/AppleShared/#recycle/" "/Volumes/AppleShared" "Wasabi:als-loveboat/AppleShared"]
2021/05/11 16:06:14 DEBUG : Creating backend with remote "/Volumes/AppleShared"
2021/05/11 16:06:14 DEBUG : Creating backend with remote "Wasabi:als-loveboat/AppleShared"
2021/05/11 16:06:14 ERROR : #recycle: error reading source directory: failed to read directory entry: fdopendir /Volumes/AppleShared/#recycle: permission denied
2021/05/11 16:06:14 DEBUG : .DS_Store: Size and modification time the same (differ by 0s, within tolerance 1ns)
2021/05/11 16:06:14 DEBUG : .DS_Store: Unchanged skipping

the synbox protects that folder, for good reasons.

for example, if ransomware were to crypt /Volumes/AppleShared/, all the older versions would be copied to the #recycle. so you do not want a standard user to access the recycle bin.
that can be tweaked in the synbox gui.

as a workaround for that error, for the synbox user that is accessing those folders, you can give that user read-only access #recycle.

that is documented here

To your point -- Preciselh

Thanks for docs on regex.

In my case, I am wrapping Rclone with a Docker GO program. So I can just look for that directory and ignore it. But I was hoping to not have to do this.

The error could be "ignored" but I ended up getting a sync error that it wouldn't delete destination files due to an IO Error and I think this is the only one. As such I agree with needing an enhancement to exclude directories. In this case, there shouldn't be a #Recycle folder on the back-end due to the error so Sync could safely ignore the error. Am I understanding this correctly?

Process

  • New folder #Recycle present but not in the backend
  • Attempt to access or write will error out so no data will be copied and in this case I recommend Rclone does not create a back-end directory RClone cannot read the source. I will look at Wasabi to see if it actually created one.
  • Similarly if there is no destination directory and the source cannot be read then is there any case where there would be data loss by ignoring the directory. The only think I van think is there is a nested "personnel" directory that never gets copied because it is secured with a different user/group. That is not a great end-user design but you, and I, don't get to make that call. Clearly the end-user needs to know that his "personnel" directory was not backed up. The same should be true for files.

I don't have a good general solution for you. I agree to not creating data loss. In my case though, I am using a back-end versioned repository albeit Wasabi is missing some tools if one really needs to recover an older version.

give read-only access to #recycle, then that should prevent the errors in the rclone log.

Excellent docs.

I changed my Rclone execution:
rclone sync --log-level=INFO --exclude **.DS_Store /Volumes/dockerprog Wasabi:als-lb/dockerprog

This executes as expected with a follow on question/assumption.

Assumptions based on testing

  1. Files that were already transferred before applying the exclude will NOT be sync deleted when run.

  2. Assume 1) above is as-designed not a bug. Correct?

It looks like you can exclude “#recycle” and it works without erroring out.

rclone sync --log-level=INFO --exclude "#recycle/" /Volumes/AppleShared Wasabi:LB/AppleShared

This is cool

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.