Where can I find the mount point for SMB shares in 13.04?

81,433

Solution 1

In 13.04, gvfs user-mounts are moved to the /run filesystem

/run/user/<username>/gvfs

see Why do my gvfs mounts not show up under ~/.gvfs or /run/user/<login>/gvfs?

[not flagged as duplicate because the answers there are unclear]

If you want to keep the old links / scripts etc., just do

rmdir ~/.gvfs/
ln -s /run/user/<username>/gvfs ~/.gvfs

Update: gvfs has been deprecated, use 'gio mount' instead. Now smb mounts are located on $XDG_RUNTIME_DIR/gvfs.

Solution 2

You can also mount it manually using mount in for instance /mnt Like

sudo mount -t cifs -o user=foobar,password=foobar,rw,hard,nosetuids,noperm,sec=ntlm //192.168.1.2/Drive ~/mnt/mount_point

(from How can I mount cifs shares in (k)ubuntu 13.04?)

Solution 3

In 15.04, 15.10 and at this moment 16.04 (not released yet) there is a confirmed bug in the gvfs package which prevents the

/run/user/<*userId>*/gvfs  

to work like expected. A workaround at this moment is to first kill both gvfs deamons before trying to mount.

To do so just execute the command:

killall gvfsd

and any links you make after that will be accessible via the gvfs dir again.

Share:
81,433

Related videos on Youtube

January
Author by

January

My first computer My first Linux

Updated on September 18, 2022

Comments

  • January
    January over 1 year

    In older Ubuntu releases, you were able to access the SMB shares mounted with Nautilus by going into the ~/.gvfs/ directory. I found it very convenient, since I like to use Nautilus to mount the shares, but do all disk operations (copy, mv, find etc.) using command line.

    I now have Ubuntu 13.04, and even though I can mount the share and use it with Nautilus (which I never use), I am unable to find the actual mount point. Is it still somewhere? Or has it been abandoned? Can I get it back?

    I know that I can mount the shares using CIFS and /etc/fstab, but I'd rather use the user space. That way, when I install a new system or transfer my home to another machine, my preferences (including credentials) stay in my home directory and I don't need to worry about updating fstab.

    Also, I do not want to mount it manually with sudo (with sudo mount -t cifs ...). Yes, I could create an alias or a script, but then I would have to either type my password every time or store my password in a credentials file. And type the sudo password. And then each time I encounter a new share, I'd need to remember how to create a credentials file. So yes, I might end up with this solution, but I would rather not change my current habits, if it is possible.

    Furthermore, there is the matter of other users for which I often provide a simple command-line solution. In 13.04, this is no longer possible (for example, because the users to whom I provide the solution are not allowed to sudo mount on their machines).

    In any case, I'm curious as to what happened to gvfs and why I can't see the mounted directories.

  • January
    January over 10 years
    Thank you very much, I should have added the paragraph I have added now (see above). In any case, I'd like to understand what happened to gvfs and how it works, so even if this were an equivalent solution (which it unfortunately isn't), I would still like to know the answer. But I really appreciate the effort.
  • January
    January over 10 years
    Yep! That's clearly the answer I was looking for. Thank you so much.
  • rkallensee
    rkallensee about 10 years
    At least in 13.10 it's <userid> instead of <username>, but the path is the same...
  • Nuzzolilo
    Nuzzolilo over 8 years
    That's the default path. How do you determine the actual path used if that path isn't what is actually being used?
  • steeldriver
    steeldriver over 8 years
    @Nuzzolilo the path should be visible in the output of the mount command, I think?
  • mivk
    mivk over 7 years
    I usually do ln -si /run/user/$UID/gvfs/ $HOME/smb on new systems to make these mounts more accessible
  • jenming
    jenming about 7 years
    This command hasn't been working for me at this point. I'm on Ubuntu 16.04 LTS, and the user=foobar option is being rejected. The syslog says: CIFS VFS: No username specified The fix for me was to use username=foobar in the options instead of user=foobar. (this comment was also added to the other question linked in this answer.)
  • Erich Kuester
    Erich Kuester over 4 years
    Still valid (2020) for Fedora 31. Instead using <username> you must take <userid> as mentioned above.
  • bluppfisk
    bluppfisk about 3 years
    if it is in an unusual location, look for this line in the output of mount: gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)