Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Can someone tell me what I'm doing wrong, what this is, or how to fix it? I'm running Fedora 18 and getting the error shown

[root@servername /]# find . -name ngirc
find: `./run/user/1000/gvfs': Permission denied
[root@servername /]# 
[root@thinktank /]# pwd
/
[root@thinktank /]# ls -ltr ./run/user/1000
ls: cannot access ./run/user/1000/gvfs: Permission denied
total 0
d?????????? ? ?    ?      ?            ? gvfs
lrwxrwxrwx. 1 root root  17 May 28 12:30 X11-display -> /tmp/.X11-unix/X0
drwx------. 2 kal  kal  120 May 28 12:30 keyring-QjDw4b
drwx------. 2 kal  kal   40 May 28 12:30 gvfs-burn
drwx------. 2 kal  kal   60 May 28 12:30 krb5cc_5f0bcaf94f916d6b61696e2251a4dbb3
drwx------. 2 kal  kal   60 May 28 18:25 dconf
share|improve this question
    
What are the permissions on ./run/user/1000/gvfs? –  unxnut May 28 '13 at 23:11
    
What is your current directory? –  schaiba May 28 '13 at 23:12
1  
    
I modified the text to show the permissions and current directory. –  kal May 28 '13 at 23:18
    
@don_crissti Why don't you make that (with the mandatory summary) an answer so that the question can get "closed"? –  Hauke Laging May 28 '13 at 23:21
show 1 more comment

2 Answers

up vote 2 down vote accepted

You aren't doing anything wrong, and there's nothing to fix. /run/user/$uid/gvfs or ~$user/.gvfs is the mount point for the FUSE interface to GVFS. GVFS is a virtual filesystem implementation for Gnome, which allows Gnome applications to access resources such as FTP or Samba servers or the content of zip files like local directories. FUSE is a way to implement filesystem drivers as user code (instead of kernel code). The GVFS-FUSE gateway makes GVFS filesystem drivers accessible to all applications, not just the ones using Gnome libraries.

Managing trust boundaries with FUSE filesystems is difficult, because the filesystem driver is running as an unprivileged user, as opposed to kernel code for traditional filesystems. To avoid complications, by default, FUSE filesystems are only accessible to the user running the driver process. Even root doesn't get to bypass this restriction.

If you're searching for a file on local filesystems only, pass -xdev to find. If you want to traverse multiple local filesystems, enumerate them all.

find -xdev / /home -name ngirc

If the file has been present since yesterday, you may try locate ngirc instead (locate searches through a file name database which is typically updated nightly).

If you do want to traverse the GVFS mount points, you'll have to do so as the appropriate user.

find / -name ngirc -path '/run/user/*/gvfs' -prune -o -path '/home/*/.gvfs' -prune -o -name ngirc -print
for d in /run/user/*; do su "${d##*/}" -c "find $d -name ngirc -print"; done
share|improve this answer
    
Thanks for the great explanation on GVFS and FUSE. I tried running 'find' like in your example and it worked great. –  kal May 30 '13 at 4:00
add comment

It's a fuse issue. No user except the owner can read. To work around the default configuration, try enabling the user_allow_other option. This option is specified by adding it to /etc/fuse.conf. It has no value, just specify the option on a blank line.

share|improve this answer
    
Thanks. I don't really understand what fuse is, but after reading a bit from the bug report in your comment and don_crissti's comment, I'm guessing this has to do with a USB hard drive that I have plugged in or my samba server? Are there any security issues that I should consider when enabling "user_allow_other" and are there any other options for mounting that I should consider? Thanks. –  kal May 28 '13 at 23:36
    
GVFS (Gnome Virtual Filesystem) is a virtual filesystem that sometimes uses FUSE (Filesystem in Userspace). The option should only be used on a single-user system, or a system in which all users are ultimately trusted. –  Christopher May 29 '13 at 0:03
    
Thanks, but this isn't really a solution for me if nobody else can use the system. How can I tell who the owner is? I tried unmounting/disconnecting my external hard drive and shutting down my samba server. All I really want to do is be able to search the entire filesystem for a file without compromising the security. Is there an alternative to FUSE and is there a way to tell exactly what it's being used for? Thanks. –  kal May 29 '13 at 1:51
add comment

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.