Can rclone ignore a local hidden file in a folder?

What is the problem you are having with rclone?

I'd really like to be able to use Dolphin (file manager) to change the icon of a folder to the cloud service symbol, however, by doing so it creates a .directory file in the folder. When I use --allow-non-empty it simply uploads the hidden folder, removing the icon.

Run the command 'rclone version' and share the full output of the command.

There is no specific reason I'm using the dev version, I thought rclone was unable to mount a folder with an icon because it wasn't the git version (I'm new to linux) but learned of the hidden folder added. Also worth noting I'm running KDE Plasma DE.

rclone v1.59.0-DEV
- os/version: arch 21.2.6 (64 bit)
- os/kernel: 5.15.32-1-MANJARO (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.18
- go/linking: dynamic
- go/tags: none

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

Google Drive and One Drive

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

I run this on startup login

rclone mount --daemon gdrive: /home/user/gdrive
rclone mount --daemon oneDrive: /home/user/oneDrive

Allow non empty lets you overmount and hide things. It doesn't upload anything. I would not use it.

I've never used a GUI on Linux so not sure what happens as you'd need to make a log file of the behavior by doing --log-file /tmp/rclone.log -vv on the end of your command.

Alright, so I made a folder named "test" with the google drive icon. It's got the .directory file in there, and I ran this command:
rclone mount --daemon --allow-non-empty gdrive: /home/user/test --log-file /tmp/rclone.log -vv

I censored my name and 2 keys, but the output gave me this:

2022/05/09 19:25:11 DEBUG : rclone: Version "v1.59.0-DEV" starting with parameters ["rclone" "mount" "--daemon" "--allow-non-empty" "gdrive:" "/home/user/test" "--log-file" "/tmp/rclone.log" "-vv"]
2022/05/09 19:25:11 DEBUG : Creating backend with remote "gdrive:"
2022/05/09 19:25:11 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/05/09 19:25:16 DEBUG : Google drive root '': 'root_folder_id = [CENSORED]' - save this in the config to speed up startup
2022/05/09 19:25:16 DEBUG : rclone: Version "v1.59.0-DEV" starting with parameters ["/usr/bin/rclone" "mount" "--daemon" "--allow-non-empty" "gdrive:" "/home/user/test" "--log-file" "/tmp/rclone.log" "-vv"]
2022/05/09 19:25:16 DEBUG : Creating backend with remote "gdrive:"
2022/05/09 19:25:16 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/05/09 19:25:16 DEBUG : Google drive root '': 'root_folder_id = [CENSORED]' - save this in the config to speed up startup

Hmmm, I could swear at some point my .directory file was being uploaded, as my onedrive and google drive kept having it show, but now it seems to simply remove it.

It doesn't remove it.

You have allow-non-empty so it over mounts and hides it.

Hmmm, I see. However, the icon disappears regardless once it's mounted. The folder returns to the normal folder icon, and I am unable to find the directory file once mounted, until it's unmounted. Will this be something I'll need to mess with KDE Plasma/Dolphin to figure out, does rclone possibly have something to solve this?

Sorry as I've never used it.

If you recreate the issue and see what the rclone.log says, we might see something.

You'd have to share the log and it's easier to see without using daemon as that puts it into the background.

hi,

try adding --allow-other

and as @Animosity022 suggested, best to remove --allow-non-empty

I replace --allow-non-empty with --allow-other and rclone timed out, likely due to the fact there is a .directory file. Here's the -vv:

>rclone mount --daemon --allow-other gdrive: /home/user/gdrive -vv                  
2022/05/10 09:15:52 DEBUG : rclone: Version "v1.59.0-DEV" starting with parameters ["rclone" "mount" "--daemon" "--allow-other" "gdrive:" "/home/user/gdrive" "-vv"]
2022/05/10 09:15:52 DEBUG : Creating backend with remote "gdrive:"
2022/05/10 09:15:52 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/05/10 09:15:57 DEBUG : Google drive root '': 'root_folder_id = (CENSORED)' - save this in the config to speed up startup
2022/05/10 09:16:57 DEBUG : Daemon timed out. Terminating daemon pid 7976
2022/05/10 09:16:57 Fatal error: mount not ready

I think the solution here is to just ask people who know about Dolphin if there's a way to have a .directory outside the target file, I don't think rclone can mount and have a local file, both accessable.

there are known issues using --daemon with rclone mount.
i would remove that flag and try again.

and not to use a beta version of rclone

https://github.com/rclone/rclone/issues/5664

Oh, alright. Then, in that case, I ran:

>rclone mount --allow-other gdrive: /home/user/test -vv                                        
2022/05/10 10:03:01 DEBUG : rclone: Version "v1.59.0-DEV" starting with parameters ["rclone" "mount" "--allow-other" "gdrive:" "/home/user/test" "-vv"]
2022/05/10 10:03:01 DEBUG : Creating backend with remote "gdrive:"
2022/05/10 10:03:01 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/05/10 10:03:06 DEBUG : Google drive root '': 'root_folder_id = (CENSORED)' - save this in the config to speed up startup
2022/05/10 10:03:06 DEBUG : Google drive root '': Mounting on "/home/user/test"
2022/05/10 10:03:06 mount helper error: fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
2022/05/10 10:03:06 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

I don't quite get what this means. For some context, I do have a gdrive and onedrive mounted to 2 plain folders already, I don't know if that would cause issues.
Oh, and by beta, do you mean the DEV version of rclone? Should I remove my rclone-git and get normal rclone?

option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
ok, that is a common and expected message and easy to fix.

  1. open /etc/fuse.conf
  2. there should be this line,
    # user_allow_other
  3. change that line to remove the comment.
    user_allow_other

as for dev version, i would not use it.

rclone mount --allow-other gdrive: /home/user/test -vv                               
2022/05/10 10:51:22 DEBUG : rclone: Version "v1.59.0-DEV" starting with parameters ["rclone" "mount" "--allow-other" "gdrive:" "/home/user/test" "-vv"]
2022/05/10 10:51:22 DEBUG : Creating backend with remote "gdrive:"
2022/05/10 10:51:22 DEBUG : Using config file from "/home/user/.config/rclone/rclone.conf"
2022/05/10 10:51:23 DEBUG : Google drive root '': 'root_folder_id = (censored)' - save this in the config to speed up startup
2022/05/10 10:51:23 DEBUG : Google drive root '': Mounting on "/home/user/test"
2022/05/10 10:51:23 mount helper error: fusermount: mountpoint is not empty
2022/05/10 10:51:23 mount helper error: fusermount: if you are sure this is safe, use the 'nonempty' mount option
2022/05/10 10:51:23 Fatal error: failed to mount FUSE fs: fusermount: exit status 1

So, I added --allow-non-empty regardless in a different command, and it overrode my .directory. Once I stopped it, the .directory returned, changing my icon upon refresh.

as per the rclone docs, /home/user/test must be empty.
"On Linux/macOS/FreeBSD start the mount like this, where /path/to/local/mount is an empty existing directory"

I'm aware it should be empty, but in order to have an icon Dolphin appears to require a .directory file inside the folder. This is my issue. When I use rclone normally, I can't mount due to the hidden file changing my icon. When I use --allow-non-empty, I can't see my icon because it's temporarily overriden (with drive files). If rclone had a feature where it ignored a specific local file, that'd be cool, but I haven't seen anything of the sort yet.

hmm, a file manager that add files to a directory, that is a terrible design.

so why not just disable that dolphin behavior?

It only adds the .directory when I make an icon. A new folder will not add anything inside. I've heard in other forums relating to dolphin that even Windows and Mac have this type of feature. I'm attempting to learn more about Dolphin, such as if its possible to have a .directory file outside the target file, but I haven't gotten an answer yet. This is a purely aesthetic problem, I just wanted to know if this was an occasional problem with people, and if rclone had a solution.

on windows, easy to disable that.

anyhoo, maybe a fellow rcloner had the same issue and will post here......

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