• mount permissions

    From Eben King@21:1/5 to All on Tue Jul 23 19:50:01 2024
    I have an older WD Mycloud Connect NAS. I'm currently trying to mount it
    via sshfs (I prefer NFS, but can't make it work either). When it's not mounted, /mnt looks like this to me:

    eben@cerberus:~$ \ls -l /mnt
    total 16
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar 4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar 7 14:02 temp2
    drwxr-xr-x 2 root root 4096 Jul 23 12:26 white_mycloud

    and to root:

    root@cerberus:~# ls -l /mnt/
    total 16
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar 4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar 7 14:02 temp2
    drwxr-xr-x 2 root root 4096 Jul 23 12:26 white_mycloud

    And after I issue this command:
    root@cerberus:~# sshfs -o default_permissions sshd@white_mycloud:/mnt/HD/HD_a2/Public /mnt/white_mycloud/ sshd@white_mycloud's password:

    it looks like this to me:

    eben@cerberus:~$ \ls -l /mnt
    ls: cannot access '/mnt/white_mycloud': Permission denied
    total 12
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar 4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar 7 14:02 temp2
    d????????? ? ? ? ? ? white_mycloud

    and to root:

    root@cerberus:~# ls -l /mnt/
    total 16
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar 4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar 7 14:02 temp2
    drwxrwxr-x 1 root eben 4096 Jul 23 11:35 white_mycloud

    What's going on here, and how do I fix it?

    The contents of the NAS are visible in /mnt/white_mycloud, just not to a
    normal user.

    --
    I know not with what weapons World War III will be fought but
    World War IV will be fought with sticks and stones.
    -- Albert Einstein

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Eduardo M KALINOWSKI@21:1/5 to Eben King on Tue Jul 23 19:50:01 2024
    On 23/07/2024 14:40, Eben King wrote:
    And after I issue this command:
    root@cerberus:~# sshfs -o default_permissions sshd@white_mycloud:/mnt/HD/HD_a2/Public /mnt/white_mycloud/ sshd@white_mycloud's password:

    By the prompt (and the behavior below) I assume you're mounting as root.

    it looks like this to me:

    eben@cerberus:~$ \ls -l /mnt
    ls: cannot access '/mnt/white_mycloud': Permission denied
    total 12
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar  4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar  7 14:02 temp2
    d????????? ? ?    ?       ?            ? white_mycloud

    and to root:

    root@cerberus:~# ls -l /mnt/
    total 16
    drwxr-xr-x 2 root root 4096 Mar 11 23:39 server
    drwxr-xr-x 2 root root 4096 Mar  4 14:37 temp
    drwxr-xr-x 2 root root 4096 Mar  7 14:02 temp2
    drwxrwxr-x 1 root eben 4096 Jul 23 11:35 white_mycloud

    What's going on here, and how do I fix it?

    As described on the sshfs manpage, by default only the mounting user
    (root, in your case) can access the filesystem.

    You can use -o allow_other to allow other users. Or, if it's only eben
    that'll be accessing, run sshfs as eben.

    --
    Why is it that all of the instruments seeking intelligent life in the
    universe are pointed away from Earth?

    Eduardo M KALINOWSKI
    eduardo@kalinowski.com.br

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael =?utf-8?B?S2rDtnJsaW5n?=@21:1/5 to All on Wed Jul 24 00:00:01 2024
    On 23 Jul 2024 14:49 -0300, from eduardo@kalinowski.com.br (Eduardo M KALINOWSKI):
    As described on the sshfs manpage, by default only the mounting user (root, in your case) can access the filesystem.

    You can use -o allow_other to allow other users. Or, if it's only eben that'll be accessing, run sshfs as eben.

    This is also common behavior with FUSE file systems in general. Slight
    extra prodding is required for a FUSE mounted file system to be
    accessible to any user (including root) other than the one who mounted it.

    --
    Michael Kjörling 🔗 https://michael.kjorling.se “Remember when, on the Internet, nobody cared that you were a dog?”

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)