-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New --links parameter not working with mount? #2975
Comments
Ok if I undetstand it correctly, it only works with local remote. |
I think this would have to be a new flag for mount, say Therefore you would be able to mount your drive remote, and have the symlinks appear as symlinks. Is that what is required do you think? |
This probably wouldn't be too tricky if someone wanted to have a go? |
yes, this is exactly the expected behavior :) |
I hope this i implemented soon, i would like too mount to follow symlinks instead of show .rclonesymlink and e able to reate symlinks in the cloud (internally .rlclonelink) but for mount a symbolik one. |
I was just wondering about this myself. It would certainly be useful if the mount layer could seamlessly translate rclonelink files back into symlinks (and bonus points if creating symlinks on a rw rclone mount would create rclonelink files behind the scenes). |
I would also love this feature! |
@ncw Any plans on implementing this? would be very useful. Had plans on using 'UrBackup' with Google Drive mount but as it's built completely on symlinks, it don't seem possible :-( |
It would be great if you could add this feature! :) |
Hi @ncw - from the documentation for the
Considering that the documentation written indicates that the flag applies to all commands, do you think it would reasonable instead to simply allow the pre-existing |
I've created a draft PR of a code addition to have the mount command support symbolic links. No extra mount parameters are needed; this works without any extra I still need to add documentation and tests, but it should be ready for use. For anyone who is still interested in this feature, please try out my branch and let me know if that works for you! I hope to have the PR ready for review in the next week or two. |
Nice one :-)
I'm not sure about that, but we can discuss more!
I note you've done this in the mount layer. There are 3 mount backends - mount/cmount/mount2 and this only applies to one of them. It would be better to do this in the VFS layer which will work with all mount backends. The mount backends will still need a tweak to recognise symlinks though. |
For folks following along like myself, the PR is #4933. (thanks for working on this!) |
Wow - I wondered a bit about those, and didn't realize those were any more than prototypes. Thanks for the note!
I doubt that will be any issue, though I admit that I'm not quite sure how the other two mount backends that I didn't tweak actually get enabled. Would you be able to point me to any existing documentation or tips on how to enable the two alternate mount backends so that I can be sure that any changes work with those? |
No worries! Note also that the VFS layer is used for the rclone servers too, eg
Sure... You use You need to supply the build tag Note that At some point I plan to drop mount2 but rclone needs mount and cmount! |
After some initial refactoring, I realized that symlink support down into the VFS layer means building symlink support for several other components - not just I don't believe I have the right experience or vision to be making these kinds of changes in the VFS layer as a first-time contributor to I say this not a way to suggest that my changes should go to the I'll keep an eye out here, and should I become more well-versed with the codebase and VFS direction at a later date, perhaps will pick this up again! |
The attempt PR #4933 was abandoned and closed. |
This feature is approaching ready - please try this beta if possible v1.69.0-beta.8381.204b90a79.fix-2975-mount-symlinks on branch fix-2975-mount-symlinks (uploaded in 15-30 mins) Use the |
fantastic, I'm looking forward for be able to setup python virtual environments directly on rclone mounts (they require symlinks by default) |
is this in the official beta build installed from the website? |
Not yet, please try from the link above |
Hello, a big thank you for working on this feature.
/mnt/symlinks/test contains two file one is a symlink of the other. logs:
using:
|
It may be colliding with the |
Seems you pinpointed the correct thing 👍 Working as expected now, thanks! |
Well spotted @darthShadow I'm not sure why that is happening - I would have expected the Assuming I can fix it - I think that is the correct think to do - would you agree? I did consider making a separate flag Maybe I should stop the Thoughts? |
Yeah, I think using the same flag would be the right approach. I would even go a step further and suggest we remove the I am just not sure if anyone has gotten used to the behaviour of seeing the |
I've made the If anyone wants to have a try v1.69.0-beta.8433.67d905e40.fix-2975-mount-symlinks on branch fix-2975-mount-symlinks (uploaded in 15-30 mins) @darthShadow wrote
So make
They will only see the symlink on |
Yeah, but it would bring it inline with the behavior of the other backends. I am fine either way, just wanted to bring it up once to see if anyone else had any comments on it. |
I've merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.69 Thank you @pasnox Any more testing gratefully received :-) BTW this was the resolution to the --links flag problem which gives the most flexibility at the cost of a few more flags (!).
|
* master: (28 commits) fs: make --links flag global and add new --local-links and --vfs-links flag vfs: add docs for -l/--links flag nfsmount,serve nfs: introduce symlink support rclone#2975 mount2: introduce symlink support rclone#2975 mount: introduce symlink support rclone#2975 cmount: introduce symlink support rclone#2975 vfstest: make VFS test suite support symlinks vfs: add symlink support to VFS vfs: add ELOOP error vfs: Add link permissions vfs: Add VFS --links command line switch vfs: add vfs.WriteFile to match os.WriteFile fs: Move link suffix to fs cmount: fix problems noticed by linter mount2: Fix missing . and .. entries sftp: fix nil check when using auth proxy Add Martin Hassack to contributors serve sftp: resolve CVE-2024-45337 googlecloudstorage: typo fix in docs onedrive: add support for OAuth client credential flow - fixes rclone#6197 ...
What is the problem you are having with rclone?
I uploaded some symlinks with "rclone copy" and parameter "--links" to my gdrive remote.
As expected, files with the extension "rclonelink" are generated.
I now expect that the rclonelink files are not visible via rclone mount. Instead they should be translated to symlinks. But actually it is not the case. Only plain rclonelink files are visible.
Additionally I'm also not able to create symlink. Instead I get I/O error (see below).
What is your rclone version (output from
rclone version
)rclone v1.46-DEV (latest commit as of today)
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Linux x64
Which cloud storage system are you using? (eg Google Drive)
Google Drive
The command you were trying to run (eg
rclone copy /tmp remote:tmp
)rclone --config /config/rclone.conf mount gdrive_decrypted:/ /mnt --allow-other --allow-non-empty --uid=1000 --gid=1000 --umask=007 --links --fast-list --rc--verbose
A log from the command with the
-vv
flag (eg output fromrclone -vv copy /tmp remote:tmp
)ln -s /tmp/testfile testlink
ln: testlink: I/O error
The text was updated successfully, but these errors were encountered: