Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Help with sshfs permissions.

    I am trying to mount a remote directory with sshfs. I would like it to be mounted at boot, be secure, and be readable by me.

    whenever I mount with sshfs, if I do not use allow_other, then only the mounter (root) can see it.

    So when I run

    sudo sshfs -o uid=1000,gid=1000 username(at)server /mountpoint

    I can not access the directory as me (uid 1000). However, when I mount it using the allow_other option it just completely ignores permissions and gives anyone access.

    How can I mount as root and give myself access without giving everyone else access?

  2. #2
    on the remote side, can you make the directory that you are mounting accessible ONLY by that user? e.g., if the remote dir is /data/mydir, you could do:

    chmod 0700 /data/mydir
    and make sure your user is the owner:

    chown username /data/mydir
    then you'd want to remote mount the parent directory(e.g., "/data"), e.g.:

    sudo sshfs -o uid=1000,gid=1000 username(at)server:/data /mountpoint
    then on the local machine, the dir /mountpoint/mydir should be accessible only by uid 1000 (just make sure the local UID matches the remote one).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts