0

I have an...interesting problem. You see, I have a SMB share on a network that I would like to mount locally. When I use Nautilus to mount it, everything works perfectly. However, I need to configure the system to run without a GUI, meaning that I can't use Nautilus and instead must create an fstab entry or something similar.

However, when I try to mount the share using the following fstab entry:

//ip.address.goes.here/sharename /path/to/mountpoint cifs  username=user,password=pass,iocharset=utf8,sec=ntlm 0 0

The share mounts, but the permissions are seriously messed up and prevent me from doing anything.

I know that the share can be mounted properly, as Nautilus does it. My question is, how does Nautilus do it?

1 Answer 1

4

Nautilus uses the Gnome Virtual File System (gvfs) to mount devices. In a system that's already running a gvfsd daemon you can initiate a mount manually using the gvfs-mount command e.g.

gvfs-mount smb://ip.address.goes.here/sharename

which should cause a link to the share to appear in the Nautilus sidebar; the actual mountpoint should appear in the filesystem at /run/user/<UID>/gvfs (or $HOME/.gvfs on earlier versions).

I'm not sure that will be an option in a truly headless environment: I suggest you create a new question detailing your exact issues with the fstab method.

2
  • I learned something today! Edit and upvote! ;-)
    – Fabby
    Mar 4, 2015 at 9:55
  • gvfs-mount did not exist in Ubuntu 21.10. I searched the web and found that now the command is gio mount smb://server.address/path/to. Apr 29, 2022 at 12:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .