# Make Windows share available to CLI?

**URL:** <https://universal-blue.discourse.group/t/make-windows-share-available-to-cli/9375>\
**Category:** Bluefin\
**Created:** [June 30, 2025, 1:52am UTC](https://universal-blue.discourse.group/t/make-windows-share-available-to-cli/9375 "2025-06-30T01:52:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Wilkie](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/matt_wilkie/32/4190_2.png) [@Matt\_Wilkie](https://universal-blue.discourse.group/u/Matt_Wilkie)\
**Post date:** [June 30, 2025, 1:52am UTC](https://universal-blue.discourse.group/t/make-windows-share-available-to-cli/9375/1 "2025-06-30T01:52:53Z")

</div>

How to mount a Windows share in user space?

Using _Files_ app and navigating to `\\server\share` works fine. I can do whatever I want provided I have permissions. However the `smb://....` mount that creates can’t be used from terminal shell.

I figured out I can do:

```auto
mkdir ~/mnt/media
sudo mount -t cifs -o username={me} //server/media ~/mnt/media
ls ~/mnt/media/
...etc

```

…but everything is read-only regardless of what my Windows permissions are.

I tried to use _mount_ without sudo but am told:

> This program is not installed setuid root - “user” CIFS mounts not supported.

LLMs tell me:

> If you absolutely need user mounts and understand the security implications, you can set the setuid bit as follows:
> 
> ```auto
> sudo chmod u+s /bin/mount
> sudo chmod u+s /bin/umount
> sudo chmod u+s /usr/sbin/mount.cifs
> 
> ```

…but:

```auto
❯ sudo chmod u+s /bin/mount
chmod: changing permissions of '/bin/mount': Read-only file system

```

So what can I do?

---

<div class="post-metadata">

**Author:** ![Matt\_Wilkie](https://yyz2.discourse-cdn.com/free1/user_avatar/universal-blue.discourse.group/matt_wilkie/32/4190_2.png) [@Matt\_Wilkie](https://universal-blue.discourse.group/u/Matt_Wilkie)\
**Post date:** [June 30, 2025, 2:42am UTC](https://universal-blue.discourse.group/t/make-windows-share-available-to-cli/9375/2 "2025-06-30T02:42:27Z")

</div>

More time with chat gippity and crafting better prompt questions led me to:

**Solution** : Use `gio mount` + symlink. If GNOME Files can see it, so can `gio` and `GVFS`.

```auto
# mount the share
❯ gio mount smb://server/share

# locate the virtual file system created
❯ cd /run/user/$(id -u)/gvfs
❯ pwd
user/1000/gvfs

# identify the mounted system name
❯ ls
smb-share:server=server,share=media

# create a symlink in home dir so we don't have use the system name
❯ cd smb-share\:server=server\,share\=media
❯ ln -s $(pwd) ~/mnt/media

❯ cd ~/mnt/media

# do stuff
❯ ls -la 
...

```

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/univeral_blue/original/2X/e/e39f7d1952979cf23b0f8d634e025fb38da50026.png) [@system](https://universal-blue.discourse.group/u/system)\
**Post date:** [July 3, 2025, 2:42am UTC](https://universal-blue.discourse.group/t/make-windows-share-available-to-cli/9375/3 "2025-07-03T02:42:52Z")

</div>

Closed on July 3, 2025, 2:42am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
