You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
New --links parameter not working with mount? #2975
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)
Reacted by William Horka, naeloob, Pranesh Prakash, SoftIce, orangejuice, Mikołaj Walukiewicz, Andrea Zorzetto, Matthias, danielkrajnik, Arnie97 and 11 more
I think this would have to be a new flag for mount, say --use-links or something like that which inteprets the .rclonelink files and turns them back into symlinks.
Therefore you would be able to mount your drive remote, and have the symlinks appear as symlinks.
I think this would have to be a new flag for mount, say --use-links or something like that which inteprets the .rclonelink files and turns them back into symlinks.
Therefore you would be able to mount your drive remote, and have the symlinks appear as symlinks.
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).
@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 :-(
I think this would have to be a new flag for mount, say --use-links or something like that which inteprets the .rclonelink files and turns them back into symlinks.
Therefore you would be able to mount your drive remote, and have the symlinks appear as symlinks.
--links, -l
...
If you supply this flag then rclone will copy symbolic links from the local storage, and store them as text files, with a '.rclonelink' suffix in the remote storage.
...
This flag applies to all commands.
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 --links flag to work both for sync as well as mount operations?
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 --links command line arguments.
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.
Reacted by Arnie97
Reacted by thekiefs, kocane, Russell Harmon, Daniel Hatton, Matthias, Mashaal Musleh, danielkrajnik, Arnie97 and Yaroslav
BTW this was the resolution to the --links flag problem which gives the most flexibility at the cost of a few more flags (!).
fs: make --links flag global and add new --local-links and --vfs-links flag
Before this change the --links flag when using the VFS override the
--links flag for the local backend which meant the local backend
needed explicit config to use links.
This fixes the problem by making the --links flag global and adding a
new --local-links flag and --vfs-links flags to control the features
individually if required.
Hi @ncw, sadly it seems symlinks don't seem to work on the mounted "crypt" type.
I am able to create symlinks inside the mount. However, after I unmount, or sometimes even randomly even if i haven't unmounted, the symlinks are being deleted erroneously.
Are the flags I'm using wrong? I'm just mounting local to local.
rclone --version
rclone v1.69.0
- os/version: darwin 14.2.1 (64 bit)
- os/kernel: 23.2.0 (arm64)
- os/type: darwin
- os/arch: arm64 (ARMv8 compatible)
- go/version: go1.23.4
- go/linking: dynamic
- go/tags: cmount
rclone mount \
--crypt-remote ~/my_crypt_dir \
:crypt: ~/folder_123 \
--crypt-password $(rclone obscure "12345") \
--crypt-password2 $(rclone obscure "12345") \
--links \
--metadata \
--vfs-cache-mode=writes \
--vfs-cache-max-size=500M \
--vfs-cache-poll-interval=5s \
--crypt-filename-encoding "base32768"
bash-3.2$ cd ~/folder_123
bash-3.2$ ln -s test.txt test_symlink # creating a symlink file with ln -s
bash-3.2$ readlink test_symlink # verify the symlink
test.txt
bash-3.2$ cd ~/
bash-3.2$ ls -la folder_123/
total 16
drwxr-xr-x@ 1 a staff 0 Feb 7 15:50 .
drwxr-x---+ 49 a staff 1568 Feb 7 15:48 ..
-rw-r--r-- 1 a staff 18 Feb 7 15:50 test.txt
lrw-r--r-- 1 a staff 8 Feb 7 15:51 test_symlink -> test.txt
bash-3.2$ cat folder_123/test.txt
this is test file
bash-3.2$ cat folder_123/test_symlink
this is test file
bash-3.2$
# after unmounting and remounting the symlink file is erroneously deleted?
bash-3.2$ ls -la folder_123/
total 8
drwxr-xr-x@ 1 a staff 0 Feb 7 15:52 .
drwxr-x---+ 49 a staff 1568 Feb 7 15:48 ..
-rw-r--r-- 1 a staff 18 Feb 7 15:50 test.txt
bash-3.2$
Activity
ErAzOr2k commentedon Feb 16, 2019
Ok if I undetstand it correctly, it only works with local remote.
Is it possible to implement this feature for drive remote?
ncw commentedon Feb 16, 2019
I think this would have to be a new flag for mount, say
--use-linksor something like that which inteprets the.rclonelinkfiles and turns them back into symlinks.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?
ncw commentedon Feb 16, 2019
This probably wouldn't be too tricky if someone wanted to have a go?
ErAzOr2k commentedon Feb 16, 2019
yes, this is exactly the expected behavior :)
felisucoibi commentedon Aug 23, 2019
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.
diamondsw commentedon Dec 23, 2019
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).
thekiefs commentedon Jun 13, 2020
I would also love this feature!
kocane commentedon Oct 15, 2020
@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 :-(
mikwaluk commentedon Nov 24, 2020
It would be great if you could add this feature! :)
dinoboy197 commentedon Nov 27, 2020
Hi @ncw - from the documentation for the
--linksflag inlocalmode: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
--linksflag to work both forsyncas well asmountoperations?Add symlink support to mount command for rclone#2975
dinoboy197 commentedon Jan 19, 2021
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
--linkscommand line arguments.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.
154 remaining items
mount: introduce symlink support #2975
mount2: introduce symlink support #2975
nfsmount,serve nfs: introduce symlink support #2975
ncw commentedon Dec 13, 2024
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 (!).
Merge branch 'master' into ia-wt-1168
i-api commentedon Feb 8, 2025
Hi @ncw, sadly it seems symlinks don't seem to work on the mounted "crypt" type.
I am able to create symlinks inside the mount. However, after I unmount, or sometimes even randomly even if i haven't unmounted, the symlinks are being deleted erroneously.
Are the flags I'm using wrong? I'm just mounting local to local.
hongkongkiwi commentedon Feb 8, 2025
You may be better off to open a new issue and link it to this.
ncw commentedon Feb 8, 2025
@i-api that does look like a bug. Can you put it in a new issue please? Thanks
despian commentedon Feb 8, 2025
I'm also using crypt and it seems to be working as expected for me. Though I'm using the
--vfs-linksswitch as well as--vfs-cache-mode full.i-api commentedon Feb 10, 2025
sure @ncw #8367
i-api commentedon Feb 10, 2025
i tried this thank you sir, unfortunately it didn't work as expected for me
pjhfggij commentedon Feb 23, 2025
nice
cmount,mount,mount2: Introduce symlink support