1

I've been trying to use sshfs to connect a notebook running in Colab Enterprise to my local machine (running an ssh server) and mount a local directory into the remote Runtime. But I get the error fuse: mount failed: Permission denied even before the SSH connection is even attempted.

I'm running as root, connecting to the SSH server as another user (i.e. sshfs someuser@ip ), and my mount point (in the notebook runtime) exists and is owned by root. What could be happening here ?

gogasca
10.1k10 gold badges86 silver badges139 bronze badges
asked Oct 30, 2023 at 20:29
3
  • Does this work in free Colab? would you mind sharing the steps to setup sshfs I can try to reproduce it. digitalocean.com/community/tutorials/… may be a good example? Commented Nov 18, 2023 at 22:49
  • I was able to reproduce the issue you saw. fuse: mount failed: Permission denied same issue with GCSfuse: {"time":"18/11/2023 11:18:06.744235","severity":"INFO","msg":"Start gcsfuse/1.2.1 (Go version go1.21.3) for app \"\" using mount point: /content/gcs-bucket-mount\n"} daemonize.Run: readFromProcess: sub-process: mountWithArgs: mountWithStorageHandle: Mount: mount: permission denied I think it has to do with the way we start the Colab container in Colab runtime. Will test further and get back to you. Commented Nov 18, 2023 at 23:18
  • I submitted a fix, will keep you posted when this will be available in production. I think of 1-2 weeks. Commented Nov 19, 2023 at 4:24

2 Answers 2

1

I tried GCSfuse and worked fine, please try SSHfs which should work as well.

Example:

!export GCSFUSE_REPO=gcsfuse-`lsb_release -c -s`
# This returns gcsfuse-jammy. Replace manually
!echo "deb https://packages.cloud.google.com/apt gcsfuse-jammy main" | sudo tee /etc/apt/sources.list.d/gcsfuse.list
!curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
!sudo apt-get update
!sudo apt-get install gcsfuse
# Create a local directory. Here you will mount GCSfuse. (GCS bucket is: $BUCKET_NAME)
!mkdir gcs-bucket-mount
!gcsfuse --implicit-dirs $BUCKET_NAME gcs-bucket-mount
{"time":"07/12/2023 12:05:39.597680","severity":"INFO","msg":"Start gcsfuse/1.2.1 (Go version go1.21.3) for app \"\" using mount point: /content/gcs-bucket-mount\n"}
answered Dec 7, 2023 at 0:10
Sign up to request clarification or add additional context in comments.

Comments

0

There was an internal feature request to allow Mount of Fuse systems into Colab Runtime, I submitted the fix and will rollout to production next week. (By Friday 1st should be in all regions)

answered Nov 20, 2023 at 18:06

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.