Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

From what I read, when mounting a network share via nautilus or gvfs-mount the mount point should be in ~/.gvfs. This seems not to be the case for me: I tried mounting both an FTP and SMB share via both nautilus and gvfs-mount under both Ubuntu Maverick and Natty and in none of the cases did I see any mount point under ~/.gvfs. I can access the shares just find in nautilus, but I want to have access via the command line, which is why I need a mount point in the file system.

Edit: Debugging following James Henstridge's answer and enzotib's comment revealed that on my laptop gvfs-fuse-daemon is running and consequently gvfs mounts show up in ~/.gvfs, whereas on the 2 workstations where ~/.gvfs remained empty gvfs-fuse-daemon was not running. On all 3 machines there are other gvfs processes running: gvfsd, gvfs-afc-volume-monitor, ...

On the laptop, mount | fgrep gvfs yields

gvfs-fuse-daemon on /home/xxx/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=xxx)

That raises the questions:

  • How are shares mounted without gvfs-fuse-daemon running? Is there no mount point created in that case and is every access to the share a gvfs library call? Which daemon is responsible? gvfsd?
  • What's the role of gvfs-fuse-daemon? Does it only create a fuse mount point in ~/.gvfs?

Update: On 12.10 and later, mounts are under /run/user/<login>/gvfs.

share|improve this question
2  
Can you show the output of mount | grep gvfs? –  enzotib Sep 13 '11 at 13:51
    
A follow up to this question: When mounting a windows shared folder it indeed is accessible in /run/user/iw/gvfs/smb-share:server=192.168.1.10,share=iwbgit$ My problem, however, is that i need the contents of these files to be in ~/. This is because node.js wants the files to be here (don't ask me why yet). However, trying to symlink to this folder, or do cp -R on its contents seems to not work. My guess is it's because of all those special signs :, =, $ in the folder name that causes the above processes to fail. Or actually, to be very preceise: only the .git subfolder is copied (then cp -R s –  codebreaker Mar 24 '13 at 20:43
    
@codebreaker I think your comment is truncated. It seems you're asking "How do I symlink a folder with special characters?". Have you made sure you escaped them correctly? Can you list the directory contents when accessing via the symlink? However, since your question is not really specific to gvfs mount points I suggest you search if it has been answered or ask a separate question. –  kynan Mar 24 '13 at 23:04

8 Answers 8

up vote 7 down vote accepted

The ~/.gvfs directory should be a FUSE mount handled by the gvfs-fuse-daemon process. If the directory appears to be empty, it would indicate that gvfs-fuse-daemon did not start correctly.

You could try starting it manually with the following command:

/usr/lib/gvfs/gvfs-fuse-daemon ~/.gvfs

If that fails, you could try checking whether anything else is mounted there, or even delete and recreate the ~/.gvfs directory first. If things still fail, could you update your question and provide any error messages printed by gvfs-fuse-daemon?

share|improve this answer
1  
Some more research revealed that gvfsd is supposed to start gvfs-fuse-daemon automatically when gvfsd gets the first request to access a remote file system. There's also a bug in ubuntu/debian that makes the ~/.gvfs directory unreadable when gvfs-fuse-daemon crashes and produces the error message Transport endpoint is not connected. –  kynan Sep 15 '11 at 0:10
    
Was it ever resolved why gvfsd does not start gvfs-fuse-daemon automatically? Under RHEL it seems to work as expected for root but not unprivileged users. –  Aaron Copley Jun 18 '12 at 22:21

I asked a related question for my Debian system, and the answer was to:

apt-get install gvfs-fuse
adduser <username> fuse

Then reboot. After a GVFS mount (via Nautilus), the share directory will be in one of two places, depending on which version of Debian or Ubuntu you have:

/run/user/<username>/gvfs
~/.gvfs
share|improve this answer

In newer versions of Ubuntu, gvfs defaults to mounting in /run/user/$USER/gvfs/.

You can check yourself where it's default mount point is by looking for your user's gvfsd-fuse line in /etc/mtab.

share|improve this answer

I have a similar problem with my 12.04 Precise system.

Drives that appear mounted in Nautilus do not appear in ~/.gvfs, particularly after a suspend/resume cycle. gvfs-fuse-daemon is running, but killing it and restarting does not fix the problem.

I found that restarting Nautilus after nautilus -q causes gvfs-fuse-daemon and Nautilus to co-operate again - the mount points reappear.

share|improve this answer

On Debian 6.0 wheezy, with lxde and nautilus. I found the ~/.gvfs directory empty too. I tried to run

/usr/lib/gvfs/gvfs-fuse-daemon ~/.gvfs

But it told me: /dev/fuse: Permission Denied.

$ ll /dev/fuse
crw-rw---T 1 root fuse 10, 229 Dec 21 11:59 /dev/fuse

I thought that maybe it's because I'm not in the fuse group, then I added my user account to that group. After a reboot, the gvfs mount shows in ~/.gvfs correctly.

share|improve this answer

In Ubuntu 12.10 the paths were changed:

$ mount |grep gvfs
gvfsd-fuse on /run/user/pcm/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=pcm)
share|improve this answer

Solved the problem (kind of).

On Ubuntu 12.10 the mountpoint appears in /run/user/(your username)/gvfs/sftp\:host\=\192.168.xxx.xxx.

Hope that helps

share|improve this answer

When I want to access files shared from a Windows machine directly (not browsing through Nautilus) I mount the share on a folder in my home directory.

For example. There if there is a Windows machine with the IP address 192.168.16.2 on the domain mydomain that has a folder shared as shared and I have a directory in my home directory called mnt, I can mount the share onmnt and access it as if it was within my home directory with:

sudo mount -t cifs "//192.168.16.2/shared" /home/stacey/mnt -o credentials=credentials,uid=stacey,gid=stacey

where credentials contains:

username=stacey
password=mypassword
domain=mydomain

Now I can use ls /home/stacey/mnt to list the files and directories in shared directory shared on 192.168.16.2 and access any file within this mount point as I would a file on my local hard drive.

You can get more information on mounting SMB shares with:

man mount.cifs
share|improve this answer
    
Not what the OP asked. –  enzotib Sep 13 '11 at 12:24
1  
No, but kynan said "but I want to have access via the command line, which is why I need a mount point in the file system", so I'm just trying to help. –  Stacey Richards Sep 13 '11 at 12:31
    
Thanks. I should have mentioned that I have considered this solution, but it imho has 2 major downsides that make it infeasible: 1) the credentials file must contain the password in plain text, which is unacceptable on a shared machine, 2) it requires root privileges and I need a solution that also works on machines where I don't have sudo –  kynan Sep 14 '11 at 22:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.