As a non-root user I can run
$ gio mount smb://raspberrypi.local/shared
and the drive mounts fine. However, the root user doesn't have read permissions for it somehow.
$ stat /run/user/1000/gvfs/smb-share:server=raspberrypi.local,share=shared File: /run/user/1000/gvfs/smb-share:server=raspberrypi.local,share=shared Size: 0 Blocks: 0 IO Block: 4096 directoryDevice: 48h/72d Inode: 16 Links: 1Access: (0700/drwx------) Uid: ( 1000/ max) Gid: ( 1000/ max)Access: 2024-07-19 19:55:20.000000000 -0700Modify: 2024-07-19 19:55:20.000000000 -0700Change: 2024-07-19 19:55:20.000000000 -0700 Birth: -$ sudo stat /run/user/1000/gvfs/smb-share:server=raspberrypi.local,share=sharedstat: cannot statx '/run/user/1000/gvfs/smb-share:server=raspberrypi.local,share=shared': Permission denied
This is surprising because I thought everything a normal user could do, the root user could do too.
How can I make my smb share visible to both my user and root?
version:
PRETTY_NAME="Ubuntu 22.04.4 LTS"NAME="Ubuntu"VERSION_ID="22.04"VERSION="22.04.4 LTS (Jammy Jellyfish)"VERSION_CODENAME=jammyID=ubuntuID_LIKE=debianHOME_URL="https://www.ubuntu.com/"SUPPORT_URL="https://help.ubuntu.com/"BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"UBUNTU_CODENAME=jammy
$ gio --version2.72.4